Main page

Portali universitari

Botanica
Chimica
Fisiologia vegetale
Fisiologia generale
Genetica

Immagine del giorno

Query error.
Unknown column 'MASTER_SUB.subtype' in 'where clause'
                     
    
    SELECT FABMEDIA.master_ID,
            FABMEDIA.ID AS media_ID, 
             FABMEDIA.user_ID, 
             FABMEDIA.title, 
             FABMEDIA.trackback, 
             MASTER.filename, 
             MASTER.extension
    FROM fabcms_fabmedia FABMEDIA
    
    JOIN ( 
         SELECT ID FROM
                 ( SELECT Y.ID
                 
                   FROM ( SELECT 1 + (649 - 1 + 1 - 50) * RAND(191119) 
                       AS start FROM DUAL ) AS init
                   JOIN fabcms_fabmedia Y
                   LEFT JOIN fabcms_fabmedia_masters AS MASTER_SUB
                     ON Y.master_ID = MASTER_SUB.ID
                   WHERE  Y.ID > init.start
                       AND Y.enabled = 1
                        /* Filters */
                         AND  MASTER_SUB.subtype = 'foto' 
                     ORDER BY Y.ID
                     LIMIT 50           -- Inflated to deal with gaps
                 ) Z ORDER BY RAND()
                
                LIMIT 1                -- number of rows desired (change to 1 if looking for a single row)
              ) T ON FABMEDIA.ID = T.ID
    
    LEFT JOIN fabcms_fabmedia_masters AS MASTER
    ON MASTER.ID = FABMEDIA.master_ID
Questa pagina è rilasciata sotto la licenza BiologiaWiki Copyright
wiki ver.... ©