示例#1
0
 public function exec()
 {
     Sql::exec($this);
 }
示例#2
0
 /**
  * Delete current model data from DB.
  */
 public function delete($id)
 {
     $sql = 'DELETE FROM ' . $this->tableName() . ' WHERE ' . $this->pkColumnName() . '=' . (int) $id . ' LIMIT 1';
     $sth = new Sql();
     if ($sth->exec($sql) === true) {
         return true;
     }
     return false;
 }
示例#3
0
 static function borrarCategoria($id)
 {
     $tbl_name = "custom_cats_" . $_SESSION['clientID'];
     PDOSql::$pdobj = pdoConnect();
     $id = Sql::esc($id);
     Sql::exec("DELETE FROM {$tbl_name} WHERE id = '" . $id . "'");
     return array('success' => true, 'data' => array(), 'msg' => 'Se borró la categoría personalizada');
 }