public function truncate($table, $highlight = false) {

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

            TRUNCATE
                ' . $this->_escape($table) . '

        ', '', 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 truncate($table, $highlight = false) {

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

            TRUNCATE
                ' . $this->_escape($table) . '

        ', '', 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 truncate ( $ table , $ highlight = false ) { // run the query $ this -> query ( '

            TRUNCATE
                ' . $ this -> _escape ( $ table ) . '

        ' , '' , false , false , $ highlight ) ; // return TRUE if query was successful, or FALSE if it wasn't return isset ( $ this -> last_result ) && $ this -> last_result !== false ; }
Shorthand for truncating tables.

<i>Truncating a table is quicker then deleting all rows, as stated in the
{@link http://dev.mysql.com/doc/refman/4.1/en/truncate-table.html MySQL documentation}. Truncating a table also
resets the value of the AUTO INCREMENT column.</i>

<code>
$db->truncate('table');
</code>

@param  string  $table          Table to truncate.

<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  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 of FALSE on error.
Shorthand for truncating tables .