public function tableExists(string $tableName)
    {
        try {
            $sql = "SELECT 1 FROM {$tableName} LIMIT 1";
            $this->prepare($sql);
            $this->logQuery("[PREPARE ONLY] $sql");
            return true;
        } catch (PDOException $e) {}

        return false;
    }
public function tableExists(string $tableName)
    {
        try {
            $sql = "SELECT 1 FROM {$tableName} LIMIT 1";
            $this->prepare($sql);
            $this->logQuery("[PREPARE ONLY] $sql");
            return true;
        } catch (PDOException $e) {}

        return false;
    }
public function tableExists ( string $ tableName ) { try { $ sql = "SELECT 1 FROM {$tableName} LIMIT 1" ; $ this -> prepare ( $ sql ) ; $ this -> logQuery ( "[PREPARE ONLY] $sql" ) ; return true ; } catch ( PDOException $ e ) { } return false ; }
Find out if the database contains a table.

@param string $tableName Table name
@return boolean True if the table exists, false otherwise
Find out if the database contains a table .