src/CarteBlanche/Library/StorageEngine/Database.php
public function table_exists($tablename = null)
    {
        if (!empty($tablename)) {
            if (isset($this->tables[$tablename])) return true;
            $query = "SELECT name FROM sqlite_master WHERE name='{$tablename}'";
            $results = $this->query($query);
            if ($results && $results->numRows()) {
                $this->tables[$tablename] = true;
                return true;
            }
        }
        return false;
    }
public function table_exists($tablename = null)
    {
        if (!empty($tablename)) {
            if (isset($this->tables[$tablename])) return true;
            $query = "SELECT name FROM sqlite_master WHERE name='{$tablename}'";
            $results = $this->query($query);
            if ($results && $results->numRows()) {
                $this->tables[$tablename] = true;
                return true;
            }
        }
        return false;
    }
Check if a table exists in the database

@param string $tablename The new table name
@return bool TRUE if the table exists, FALSE otherwise