function insert($data) { if ($this->table == "sdb_dbeav_meta_value_int" && $data['value'] == "") { $data['value'] = 0; } $rs = $this->db->exec('select * from ' . $this->table . ' where 0=1'); $sql = base_db_tools::getInsertSQL($rs, $data); $this->db->exec($sql); }
public function insert($data) { foreach ($data as $k => $v) { if (is_array($v)) { $data[$k] = serialize($v); } } $sql = base_db_tools::getInsertSQL($this->table, $data); $this->db->exec($sql); }
function insert($data) { $rs = $this->db->exec('select * from ' . $this->table . ' where 0=1'); foreach ($data as $k => $v) { if (is_array($v)) { $data[$k] = serialize($v); } } $sql = base_db_tools::getInsertSQL($rs, $data); $this->db->exec($sql); }
public function insert($data) { if ($this->table == 'vmc_dbeav_meta_value_int' && $data['value'] === '') { return; } // $data['value'] =0; if ($this->table == 'vmc_dbeav_meta_value_decimal' && $data['value'] === '') { return; } // $data['value'] ='0.0000'; $sql = base_db_tools::getInsertSQL($this->table, $data); $this->db->exec($sql); }