Example #1
0
    private function _isContextSupported($table)
    {
        if (! isset(self::$_ContextTables))
        {
            $query = "SELECT TABLE_NAME
                      FROM INFORMATION_SCHEMA.COLUMNS
                      WHERE COLUMN_NAME = 'context'";
            $result = mysql_query($query);

            self::$_ContextTables = array();        // prevent isset() test above from occurring again

            while ($row = mysql_fetch_assoc($result))
            {
                self::$_ContextTables[$row['TABLE_NAME']] = $row['TABLE_NAME'];
            }
        }

        return array_key_exists($table, self::$_ContextTables);
    }