public function update($condition, $data) { $conds = array(); $dt = array(); foreach ($condition as $key => $val) { if (in_array($key, array("title"))) { $conds[$key] = parent::setValForString($val); } else { $conds[$key] = $val; } } foreach ($data as $key => $val) { if (in_array($key, array("title"))) { $dt[$key] = parent::setValForString($val); } else { $dt[$key] = $val; } } return parent::update($conds, $dt); }
public function update($condition, $data) { $conds = array(); $dt = array(); foreach ($condition as $key => $val) { if (in_array($key, array("name", "lastname", "birthday", "email", "password", "reg_date", "last_update"))) { $conds[$key] = parent::setValForString($val); } else { $conds[$key] = $val; } } foreach ($data as $key => $val) { if (in_array($key, array("name", "lastname", "birthday", "email", "password", "reg_date", "last_update"))) { $dt[$key] = parent::setValForString($val); } else { $dt[$key] = $val; } } return parent::update($conds, $dt); }
public function create() { $arr = array("price" => parent::setValForString($this->price), "cnt" => parent::setValForString($this->cnt), "id_goods" => parent::setValForString($this->id_goods), "id_order" => parent::setValForString($this->id_order)); parent::setFieldsAndValues($arr); parent::create(); }