public static function tableExists($tableName)
    {
        $query = "SELECT 1 FROM $tableName LIMIT 1";

        try {
            $result = Connection::db()->query($query);
        } catch (Exception $e) {
            return false;
        }

        return $result !== false;
    }
public static function tableExists($tableName)
    {
        $query = "SELECT 1 FROM $tableName LIMIT 1";

        try {
            $result = Connection::db()->query($query);
        } catch (Exception $e) {
            return false;
        }

        return $result !== false;
    }
public static function tableExists ( $ tableName ) { $ query = "SELECT 1 FROM $tableName LIMIT 1" ; try { $ result = Connection :: db ( ) -> query ( $ query ) ; } catch ( Exception $ e ) { return false ; } return $ result !== false ; }
Checks if a given table exists in the database
@param  string $tableName name of the table to be checked
@return bool           true if table is found, false otherwise
Checks if a given table exists in the database