CI_DB_forge::_drop_table PHP Method

_drop_table() protected method

Generates a platform-specific DROP TABLE string
protected _drop_table ( string $table, boolean $if_exists ) : string
$table string Table name
$if_exists boolean Whether to add an IF EXISTS condition
return string
    protected function _drop_table($table, $if_exists)
    {
        $sql = 'DROP TABLE';
        if ($if_exists) {
            if ($this->_drop_table_if === FALSE) {
                if (!$this->db->table_exists($table)) {
                    return TRUE;
                }
            } else {
                $sql = sprintf($this->_drop_table_if, $this->db->escape_identifiers($table));
            }
        }
        return $sql . ' ' . $this->db->escape_identifiers($table);
    }