LessQL\Database::delete PHP Method

delete() public method

DELETE FROM $table [WHERE $where]
public delete ( string $table, array $where = [], array $params = [] ) : PDOStatement
$table string
$where array
$params array
return PDOStatement
    function delete($table, $where = array(), $params = array())
    {
        if (!is_array($where)) {
            $where = array($where);
        }
        if (!is_array($params)) {
            $params = array_slice(func_get_args(), 2);
        }
        $table = $this->rewriteTable($table);
        $query = "DELETE FROM " . $this->quoteIdentifier($table);
        $query .= $this->getSuffix($where);
        $this->onQuery($query, $params);
        $statement = $this->prepare($query);
        $statement->execute($params);
        return $statement;
    }