コード例 #1
0
ファイル: Crud.php プロジェクト: phlib/db
 /**
  * Delete from table.
  *
  * @param string $table
  * @param string $where
  * @param array $bind
  * @return int Number of affected rows
  */
 public function delete($table, $where = '', array $bind = array())
 {
     $table = $this->adapter->quoteIdentifier($table);
     $sql = "DELETE FROM {$table}" . ($where ? " WHERE {$where}" : '');
     $stmt = $this->adapter->query($sql, $bind);
     return $stmt->rowCount();
 }