Pheasant\Database\Mysqli\Table::exists PHP Method

exists() public method

Determines if the table exists (name only, column definition not checked)
public exists ( )
    public function exists()
    {
        $sql = 'SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE Table_Name=? ';
        $params = array($this->_name->table);
        if (is_null($this->_name->database)) {
            $sql .= 'AND TABLE_SCHEMA=database() ';
        } else {
            $sql .= 'AND TABLE_SCHEMA=? ';
            $params[] = $this->_name->database;
        }
        return (bool) $this->_connection->execute($sql, $params)->scalar();
    }