Db::delete PHP Méthode

delete() public méthode

删除记录
public delete ( array $options = [] ) : false | integer
$options array 表达式
Résultat false | integer | integer
    public function delete($options = array())
    {
        $sql = 'DELETE FROM ' . $this->parseTable($options['table']) . $this->parseWhere(isset($options['where']) ? $options['where'] : '') . $this->parseOrder(isset($options['order']) ? $options['order'] : '') . $this->parseLimit(isset($options['limit']) ? $options['limit'] : '') . $this->parseLock(isset($options['lock']) ? $options['lock'] : false);
        return $this->execute($sql);
    }

Usage Example

Exemple #1
1
 public function deleteCurrency($currencyId)
 {
     global $mySession;
     $db = new Db();
     $condition1 = "currency_id='" . $currencyId . "'";
     $db->delete(CURRENCY, $condition1);
 }
All Usage Examples Of Db::delete