Granada\ORM::delete_many PHP Method

delete_many() public method

Delete many records from the database Added: could delete many of a join query, if you define $join to true and the table where you want to delete the records
public delete_many ( $join = false, $table = false )
    public function delete_many($join = false, $table = false)
    {
        if ($join) {
            // Build and return the full DELETE statement by concatenating
            // the results of calling each separate builder method.
            $query = $this->_join_if_not_empty(" ", array("DELETE {$table} FROM", $this->_quote_identifier($this->_table_name), $this->_build_join(), $this->_build_where()));
        } else {
            // Build and return the full DELETE statement by concatenating
            // the results of calling each separate builder method.
            $query = $this->_join_if_not_empty(" ", array("DELETE FROM", $this->_quote_identifier($this->_table_name), $this->_build_where()));
        }
        return self::_execute($query, $this->_values, $this->_connection_name);
    }
ORM