Пример #1
0
 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);
 }
Пример #2
0
 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);
 }
Пример #3
0
 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();
 }