public function exec() { Sql::exec($this); }
/** * 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; }
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'); }