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);
}
}