Browse Source

UPDATE $where similar to INSERT #0

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@123 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
master
aterekhov 15 years ago
parent
commit
4a22759e3d
  1. 3
      model/Model.php

3
model/Model.php

@ -113,6 +113,9 @@ abstract class Model
*/ */
public function update($data, $where) public function update($data, $where)
{ {
if (is_int($where)) {
$where = $this->identify($this->key) . '=' . (int) $where;
}
return $this->db->update($this->table(false), $data, $where); return $this->db->update($this->table(false), $data, $where);
} }

Loading…
Cancel
Save