how to use multiple $_name using extends Zend_Db_Table_Abstract in zend frame work.

Posted by karthik on Stack Overflow See other posts from Stack Overflow or by karthik
Published on 2010-04-08T12:55:53Z Indexed on 2010/04/08 13:03 UTC
Read the original article Hit count: 156

Filed under:
|
|

we tried to do like this,but it is showing some errors.Our table names are users and messages.

<?php

class Application_Model_childconnect1 extends Zend_Db_Table_Abstract
{
    protected $_name = 'users';

    public function loginvalidation($username,$pwd)
    {


        $row = $this->fetchRow('UserName = \'' . $username . '\'and UserPW = \''. $pwd . '\'');
        if (!$row)
        {
            $msg="invalid";
            return $msg;
        }
        else
        {
            return $row->toArray();
        }

    }

    protected $_name = 'messages';

     public function replymessage($message)
      {

        $data=array(
            'MessageText'=>$message
              );
        $this->insert($data);
      }


}

© Stack Overflow or respective owner

Related posts about zend-db-table

Related posts about zend-framework