public function delete($table, $where = '', $replacements = '', $highlight = false) {

        // run the query
        $this->query('

            DELETE FROM
                ' . $this->_escape($table) .
            ($where != '' ? ' WHERE ' . $where : '') . '

        ', $replacements, false, false, $highlight);

        // return TRUE if query was successful, or FALSE if it wasn't
        return isset($this->last_result) && $this->last_result !== false;

    }
public function delete($table, $where = '', $replacements = '', $highlight = false) {

        // run the query
        $this->query('

            DELETE FROM
                ' . $this->_escape($table) .
            ($where != '' ? ' WHERE ' . $where : '') . '

        ', $replacements, false, false, $highlight);

        // return TRUE if query was successful, or FALSE if it wasn't
        return isset($this->last_result) && $this->last_result !== false;

    }
public function delete ( $ table , $ where = '' , $ replacements = '' , $ highlight = false ) { // run the query $ this -> query ( '

            DELETE FROM
                ' . $ this -> _escape ( $ table ) . ( $ where != '' ? ' WHERE ' . $ where : '' ) . '

        ' , $ replacements , false , false , $ highlight ) ; // return TRUE if query was successful, or FALSE if it wasn't return isset ( $ this -> last_result ) && $ this -> last_result !== false ; }
Deletes rows from a table.

<code>
// delete male users
$db->delete('users', 'gender = "M"');

// when working with variables you should use the following syntax
// this way you will stay clear of SQL injections
$db->delete('users', 'gender = ?', array($gender));
</code>

@param  string  $table          Table from which to delete.

<i>May also be given like databasename.tablename if a database was not explicitly
selected with the {@link connect()} or {@link select_database()} methods prior to
calling this method.</i>

@param  string  $where          (Optional) A MySQL WHERE clause (without the WHERE keyword).

Default is "" (an empty string).

@param  array   $replacements   (Optional) An array with as many items as the total parameter markers ("?", question
marks) in <i>$where</i>. Each item will be automatically {@link escape()}-ed and
will replace the corresponding "?". Can also include an array as an item, case in
which each value from the array will automatically {@link escape()}-ed and then
concatenated with the other elements from the array - useful when using <i>WHERE
column IN (?)</i> conditions. See second example {@link query here}.

Default is "" (an empty string).

@param  boolean $highlight      (Optional) If set to TRUE the debugging console will be opened automatically
and the query will be shown - really useful for quick and easy debugging.

Default is FALSE.

@since  1.0.9

@return boolean                 Returns TRUE on success or FALSE on error.
Deletes rows from a table .