SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,178
    Mentioned
    63 Post(s)
    Tagged
    2 Thread(s)

    Zend - DbTable Help

    Don't know how tog et this working... Thanks in advance!

    PHP Code:
    class Model_DbTable_Users extends Zend_Db_Table_Abstract
    {
    protected 
    $_name 'tblUsers';

    public function 
    getUser($usr)
    {
        
    $row $this->select("username = '$usr'");
        if (!
    $row) {
            throw new 
    Exception("Count not find row $usr");
        }
        return 
    $row->toArray();
        }
    }

    public function 
    indexAction()
    {
        
    $albums = new Model_DbTable_Users();
        
    $row $albums->fetchAll('gwolfe');
        echo 
    $row['username'], $row['fname'];


  2. #2
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,178
    Mentioned
    63 Post(s)
    Tagged
    2 Thread(s)
    Also, I know to have the db params in application.ini. The SQL is connection, I just dont know how to get a proper query going, I get an sql error saying that it cant find the column.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •