Exemple #1
0
 public function delete($where = '', array $args = [])
 {
     $whereSql = $where == '' ? '' : " WHERE {$where}";
     $this->db->execute('DELETE FROM ' . $this->quoteIdentifier(static::getTableName()) . $whereSql, $args);
     return $this->db->affectedRows();
 }
 public function affected()
 {
     list($sql, $args) = $this->prepareSqlAndArgs();
     $this->db->execute($sql, $args);
     return $this->db->affectedRows();
 }