Is something wrong with my zend queries these are extending Zend_Db_Table_Abstract
class?
Update is returning zero (0) on successful update also it should be one. Adding new user is return nothing on successful insert.
Please help me.
/*
* Adding new user into database
* @params unknown_type $title, $firstName, $lastName
* @return boolean $sql
*/
public function addNewUser( $title, $firstName, $lastName ) {
$data = array (
'user_id' => '',
'title' => $title,
'first_name' => $firstName,
'last_name' => $lastName,
);
$result = $this->insert($data);
return $result;
}
/*
* updating user details using given user id
* @params unknown_type values $userId, $title, $firstName, $lastName
* @return nuumber of rows update, hopefully 1
*/
public function updateUserDetails( $userId, $title, $firstName, $lastName )
{ //echo $userId;
$data = array ( 'first_name' => $firstName, 'last_name' => $lastName );
$where = $this ->getAdapter()
->quoteInto('user_id = ?', $userId);
$result = $this ->update($data, $where );
return $result;
}