insert() fixed, #8
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@139 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -97,9 +97,7 @@ abstract class Model implements iCacheable
|
||||
*/
|
||||
public function insert($data, $on_duplicate = array())
|
||||
{
|
||||
if (!$affected = $this->db->insert($this->table(false), $data, $on_duplicate)) {
|
||||
return false;
|
||||
}
|
||||
$affected = $this->db->insert($this->table(false), $data, $on_duplicate);
|
||||
return ($this->getInsertId()) ? $this->getInsertId() : $affected;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user