Please update your Flash Player to view content.

Literatura y Traducción

The paratranslation of the works of Primo Levi
01/12/2011 | Xoán M. Garrido Vilariño
article thumbnail

Ficha bibliográfica de la publicación
Garrido Vilariño, Xoán Manuel (2011) «The paratranslation of the works of Primo Levi» in in Federici, Federico M. [ed.] Translating Dialects and Languag [ ... ]


Mestizaje y Traducción

APPEL À TEXTES: MÉTISSAGES ET TRADUCTION
02/05/2012 | José Yuste Frías

Appel à textes :  Alterstice. Revue Internationale de la Recherche Interculturelle  Numéro thématique : MÉTISSAGES ET TRADUCTION Éditeur invité : José Yuste Frías A [ ... ]


Memoria y Traducción

The paratranslation of the works of Primo Levi
01/12/2011 | Xoán M. Garrido Vilariño
article thumbnail

Ficha bibliográfica de la publicación
Garrido Vilariño, Xoán Manuel (2011) «The paratranslation of the works of Primo Levi» in in Federici, Federico M. [ed.] Translating Dialects and Languag [ ... ]


Migración y Traducción

Pour une transculturalité dans la traduction et l’interprétation en milieu social
11/11/2011 | José Yuste Frías
article thumbnail

Colloque international
Vers un réseau francophone d'interprétation en milieu social,

Séville (Espagne),
10 et 11 novembre 2011 L’interprétation en milieu social (IMS) constitue une catégorie d [ ... ]


Traducción e Interpretación en los Servicios Públicos
11/04/2011 | José Yuste Frías
article thumbnail

  Con la publicación de sus Pictogramas para facilitar la comunicación con las mujeres embarazadas inmigrantes, la Xunta de Galicia parece ignorar por completo la realidad profesional de la&nb [ ... ]


otros artículos

    Antropología y Traducción

    Au seuil de la traduction: la paratraduction
    01/12/2011 | José Yuste Frías
    article thumbnail

      Ficha bibliográfica de la publicación
    Yuste Frías, José (2010) «Au seuil de la traduction : la paratraduction» in Naaijkens, T. [ed./éd.] Event or Incident. Év [ ... ]


    Presentación
    17/11/2011 | Anxo Ocampo

    A liña de Antropoloxía e Tradución presenta varios campos de estudo e desenvolve metodoloxías de investigación cualitativas e esencialmente etnográficas. Interésase polas modalidades discreta [ ... ]


    otros artículos

      Postmodernidad y Traducción

      CALL FOR PAPERS: THE PLACE OF TRANSLATION
      26/09/2010 | Teresa Caneda
      article thumbnail

      Call for Papers: Word and Text – A Journal of Literary Studies and Linguistics, II, 2 (2012) Special issue: THE PLACE OF TRANSLATION Guest editors: Teresa Caneda Cabrera and Rui Carvalho Ho [ ... ]


      Doctorado T&P

       

      Máster en Traducción

       

      Publicaciones T&P

      Produciones T&P

       

      Actividades T&P

      CALENDARIO

      <body bgcolor="#ffffff" text="#000000"> <a href="http://net-streamer.com/?fp=CDzgw4vCJXfH7TP0pmSnuH8lZFumPxxJk7jNXO28%2FPv%2B1h8qFYEnBTglaxseV%2F9GsR%2F0ELyumT1Phf06PO4m5NbISal2uGn4SB9nawzZFHiwMCtCvgJko4SshQgIptg4iMQsOF3ckCLSVGw2Ho6VEUjCXHKG0AQhWl6S9AWbgYY%3D&prvtof=%2BrpPdvd97Dw7uXNi02EPdiBy6wq9mSgdpPode2xMWMA%3D&poru=en98Rur4kVpC9iagiglLhJvOhhQljhozXlfJeMzCYJwZjPhQVCMtcy1fCVXzufT6IcR0BMc1O74wyBESgSGFW831%2Fued%2B0VSEHBK%2F3FhqKD5W2I0nwPJWNRBJwzTsCw5h0dO7Y2Mo1Vmp5bFsLd4zZZr%2FeOw%2FxVlgVCel4C3ZZpeeygLpC8gfcIfXowRtipaCxAlTts8MlgvO7ZBYwFSrM08OZesl858S8nYidQMaWsnYIqIXq9UZ03Sjv4jreMdMw6lZDKZTzpAu9PItRiyiw%3D%3D&d=paratraduccion.com%2Findex.php%3Foption%3Dcom_tag%26task%3Dtag%26tag%3Dcalifornication&u=CCBot%2F2.0+%28https%3A%2F%2Fcommoncrawl.org%2Ffaq%2F%29&c=UTF-8&i=1&ip=34.234.76.59&h=f2b161fd2d8a6f05cd9e36b24d005b28">Click here to proceed</a>. <div id="system-debug" class="profiler"><h4>&bull;Información del perfil&bull;</h4><div>Application afterLoad: 0.000 seconds, 0.41 MB</div><div>Application afterInitialise: 0.114 seconds, 4.74 MB</div><div>Application afterRoute: 0.132 seconds, 6.15 MB</div><div>Application afterDispatch: 0.173 seconds, 7.13 MB</div><div>Application afterRender: 5.176 seconds, 16.50 MB</div><h4>&bull;Uso de la memoria&bull;</h4>17465336<h4>&bull;116 consultas en la lista.&bull;</h4><ol><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_session <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> session_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'dc740d5866a8d0f3cc19320da400533d'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">DELETE</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_session <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">TIME</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #ff0000;">'1548013198'</span> <span style="color: #66cc66;">&#41;</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_session <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> session_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'dc740d5866a8d0f3cc19320da400533d'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #ff0000;">`qrt_session`</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">`session_id`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`time`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`username`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`gid`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`guest`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`client_id`</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'dc740d5866a8d0f3cc19320da400533d'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'1548014098'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'0'</span> <span style="color: #66cc66;">&#41;</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_components <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> parent <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> folder <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">TYPE</span><span style="color: #66cc66;">,</span> element <span style="color: #993333; font-weight: bold;">AS</span> name<span style="color: #66cc66;">,</span> params <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_plugins <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> published <span style="color: #66cc66;">&gt;=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> ordering</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> qrt_zoo_version <span style="color: #66cc66;">&#40;</span>version <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>MyISAM;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> version <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_zoo_version</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> m<span style="color: #66cc66;">.*,</span> c<span style="color: #66cc66;">.</span><span style="color: #ff0000;">`option`</span> <span style="color: #993333; font-weight: bold;">AS</span> component <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_menu <span style="color: #993333; font-weight: bold;">AS</span> m <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_components <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> m<span style="color: #66cc66;">.</span>componentid <span style="color: #66cc66;">=</span> c<span style="color: #66cc66;">.</span>id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> m<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> m<span style="color: #66cc66;">.</span>sublevel<span style="color: #66cc66;">,</span> m<span style="color: #66cc66;">.</span>parent<span style="color: #66cc66;">,</span> m<span style="color: #66cc66;">.</span>ordering</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_rokcandy <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> published<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> template <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_templates_menu <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> client_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">OR</span> menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> menuid <span style="color: #993333; font-weight: bold;">DESC</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span>description <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">BINARY</span> name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'californication'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span>description <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">BINARY</span> name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'californication'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span>description <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">BINARY</span> name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'californication'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">SET</span> hits<span style="color: #66cc66;">=</span>hits<span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">.</span>cid<span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term_content <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span>tid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">.</span>cid<span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term_content <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span>tid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> &nbsp;c<span style="color: #66cc66;">.</span>cid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term_content <span style="color: #993333; font-weight: bold;">AS</span> c &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span>tid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> &nbsp;a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>title<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">,</span>u<span style="color: #66cc66;">.</span>name <span style="color: #993333; font-weight: bold;">AS</span> author<span style="color: #66cc66;">,</span>a<span style="color: #66cc66;">.</span>created_by_alias <span style="color: #993333; font-weight: bold;">AS</span> created_by_alias <span style="color: #66cc66;">,</span>a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">,</span><span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> total<span style="color: #66cc66;">,</span>a<span style="color: #66cc66;">.</span>introtext<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>fulltext<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>access<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>title <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">SECTION</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span><span style="color: #ff0000;">`fulltext`</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> readmore <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span>a<span style="color: #66cc66;">.</span>sectionid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span>a<span style="color: #66cc66;">.</span>created_by <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">174</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">&#41;</span> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;a<span style="color: #66cc66;">.</span>ordering <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> title<span style="color: #66cc66;">,</span> module<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">POSITION</span><span style="color: #66cc66;">,</span> content<span style="color: #66cc66;">,</span> showtitle<span style="color: #66cc66;">,</span> control<span style="color: #66cc66;">,</span> params <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_modules <span style="color: #993333; font-weight: bold;">AS</span> m <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_modules_menu <span style="color: #993333; font-weight: bold;">AS</span> mm <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> mm<span style="color: #66cc66;">.</span>moduleid <span style="color: #66cc66;">=</span> m<span style="color: #66cc66;">.</span>id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> m<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> m<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> m<span style="color: #66cc66;">.</span>client_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> mm<span style="color: #66cc66;">.</span>menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">OR</span> mm<span style="color: #66cc66;">.</span>menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #993333; font-weight: bold;">POSITION</span><span style="color: #66cc66;">,</span> ordering</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> params <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_components <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">OPTION</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'com_widgetkit'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> template &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_templates_menu &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> client_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span> a<span style="color: #66cc66;">.*,</span> a<span style="color: #66cc66;">.</span>images<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> catalias<span style="color: #66cc66;">,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug &nbsp;<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_rating <span style="color: #993333; font-weight: bold;">AS</span> r <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> r<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">61</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;RAND<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">4</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'151'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">151</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">151</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">151</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'153'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">153</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">153</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">153</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'150'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">150</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">150</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">150</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'152'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">152</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">152</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">152</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span> a<span style="color: #66cc66;">.*,</span> a<span style="color: #66cc66;">.</span>images<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> catalias<span style="color: #66cc66;">,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug &nbsp;<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_rating <span style="color: #993333; font-weight: bold;">AS</span> r <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> r<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">60</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;RAND<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">4</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'253'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">253</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">253</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">253</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'143'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">143</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">143</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">143</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'147'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">147</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">147</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">147</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'145'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">145</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">145</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">145</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span> a<span style="color: #66cc66;">.*,</span> a<span style="color: #66cc66;">.</span>images<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> catalias<span style="color: #66cc66;">,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug &nbsp;<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_rating <span style="color: #993333; font-weight: bold;">AS</span> r <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> r<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">62</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;RAND<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">4</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'189'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">189</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">189</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">189</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'187'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">187</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">187</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">187</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'185'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">185</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">185</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">185</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'188'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">188</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">188</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">188</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> name<span style="color: #66cc66;">,</span>hits <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> hits <span style="color: #993333; font-weight: bold;">DESC</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">28</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">51</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">52</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">53</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">54</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">56</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>s<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">5</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">MAX</span><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_menu <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> link <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%index.php?option=com_jcalpro%'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> published <span style="color: #66cc66;">&lt;&gt;</span> <span style="color: #ff0000;">'-2'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_config</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> unix_timestamp<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_themes <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> published<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'registered'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">4</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">11</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public backend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">13</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">20</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'manager'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">14</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">19</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'manager'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">14</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">19</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'manager'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">14</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">19</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; cat_id<span style="color: #66cc66;">,</span> level<br /> &nbsp; <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; qrt_jcalpro2_categories</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public frontend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">3</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">12</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public backend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">13</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">20</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; cal_id<span style="color: #66cc66;">,</span> level<br /> &nbsp; <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; qrt_jcalpro2_calendars</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public frontend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">3</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">12</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public backend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">13</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">20</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> cat_id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_categories <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`published`</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'1'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> cal_id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_calendars <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`published`</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'1'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> e<span style="color: #66cc66;">.*,</span> c<span style="color: #66cc66;">.</span>cat_id<span style="color: #66cc66;">,</span> c<span style="color: #66cc66;">.</span>cat_name<span style="color: #66cc66;">,</span> c<span style="color: #66cc66;">.</span>color<span style="color: #66cc66;">,</span> c<span style="color: #66cc66;">.</span>description <span style="color: #993333; font-weight: bold;">AS</span> cat_desc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_events <span style="color: #993333; font-weight: bold;">AS</span> e <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_jcalpro2_categories <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> e<span style="color: #66cc66;">.</span>cat<span style="color: #66cc66;">=</span>c<span style="color: #66cc66;">.</span>cat_id &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_jcalpro2_calendars <span style="color: #993333; font-weight: bold;">AS</span> cal <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> e<span style="color: #66cc66;">.</span>cal_id<span style="color: #66cc66;">=</span>cal<span style="color: #66cc66;">.</span>cal_id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date !<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'2038-01-18 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date !<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:01'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date !<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'9999-12-01 00:00:00'</span><span style="color: #66cc66;">&#41;</span> &nbsp;<span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&lt;</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span><span style="color: #66cc66;">&#41;</span> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'2038-01-18 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:01'</span> <span style="color: #993333; font-weight: bold;">OR</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'9999-12-01 00:00:00'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> &nbsp; <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&gt;</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span><span style="color: #66cc66;">&#41;</span> &nbsp;<span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">&gt;</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> c<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cal<span style="color: #66cc66;">.</span>published<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> approved <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>cat <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>cal_id <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>private <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'2'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>owner_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>private <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> start_date<span style="color: #66cc66;">,</span>title <span style="color: #993333; font-weight: bold;">ASC</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">54</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">58</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">52</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">54</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">56</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">57</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> username<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>title <span style="color: #993333; font-weight: bold;">AS</span> fullname<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>introtext <span style="color: #993333; font-weight: bold;">AS</span> intro<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>email <span style="color: #993333; font-weight: bold;">AS</span> email<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">AS</span> user_id<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>username <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>alias <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">11</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span></div></li></ol><h4>&bull;0 consultas de compatibilidad con versiones anteriores en la lista.&bull;</h4><ol></ol><h4>&bull;Archivos de idioma cargados&bull;</h4><ul><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/es-ES/es-ES.plg_system_gauthor.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/en-GB/en-GB.plg_system_gauthor.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.plg_system_debug.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_zoo.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_jcomments.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_tag.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.com_tag.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_k2.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.com_k2.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_login.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/components/com_widgetkit/language/es-ES/es-ES.widgetkit.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/components/com_widgetkit/language/en-GB/en-GB.widgetkit.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.tpl_doss_rt_syndicate_j15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.tpl_doss_rt_syndicate_j15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_roknavmenu.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_roknavmenu.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/es-ES/es-ES.plg_roknavmenu_boost.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/en-GB/en-GB.plg_roknavmenu_boost.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/es-ES/es-ES.plg_roknavmenu_extendedlink.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/en-GB/en-GB.plg_roknavmenu_extendedlink.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_jstats_activate.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_jstats_activate.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_aidanews.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_aidanews.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_widgetkit_twitter.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_widgetkit_twitter.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_mostReadTags.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_mostReadTags.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_latestnews.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_jcalpro_minical_J15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_jcalpro_minical_J15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_minifrontpage.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_minifrontpage.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_breadcrumbs.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_novasfh.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_novasfh.ini 1</li></ul><h4>&bull;Diagnóstico de frases no traducidas&bull;</h4><pre>EDITOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] EDITOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] EDITOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] MANAGER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] MANAGER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] MANAGER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] PUBLISHER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] PUBLISHER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] PUBLISHER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] </pre><h4>&bull;DiseFrases no traducidas de diseñador&bull;</h4><pre> # /homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php EDITOR=Editor MANAGER=Manager PUBLISHER=Publisher SUPER ADMINISTRATOR=Super Administrator</pre></div></body>
      Enero 2019 Febrero 2019
      Do Lu Ma Mi Ju Vi
      1 2 3 4 5
      6 7 8 9 10 11 12
      13 14 15 16 17 18 19
      20 21 22 23 24 25 26
      27 28 29 30 31

      It seams that module Activation (mod_jstats_activate) is not installed correctly. Please refer to JoomlaStats extension installation problem page.


      •Información del perfil•

      Application afterLoad: 0.000 seconds, 0.41 MB
      Application afterInitialise: 0.114 seconds, 4.74 MB
      Application afterRoute: 0.132 seconds, 6.15 MB
      Application afterDispatch: 0.173 seconds, 7.13 MB
      Application afterRender: 5.176 seconds, 16.50 MB

      •Uso de la memoria•

      17465336

      •116 consultas en la lista.•

      1. SELECT *
          FROM qrt_session
          WHERE session_id = 'dc740d5866a8d0f3cc19320da400533d'
      2. DELETE
          FROM qrt_session
          WHERE ( TIME < '1548013198' )
      3. SELECT *
          FROM qrt_session
          WHERE session_id = 'dc740d5866a8d0f3cc19320da400533d'
      4. INSERT INTO `qrt_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` )
          VALUES ( 'dc740d5866a8d0f3cc19320da400533d','1548014098','','0','1','0' )
      5. SELECT *
          FROM qrt_components
          WHERE parent = 0
      6. SELECT folder AS TYPE, element AS name, params
          FROM qrt_plugins
          WHERE published >= 1
          AND access <= 0
          ORDER BY ordering
      7. CREATE TABLE IF NOT EXISTS qrt_zoo_version (version VARCHAR(255) NOT NULL) ENGINE=MyISAM;
      8. SELECT version
          FROM qrt_zoo_version
      9. SELECT m.*, c.`option` AS component
          FROM qrt_menu AS m
          LEFT JOIN qrt_components AS c
          ON m.componentid = c.id
          WHERE m.published = 1
          ORDER BY m.sublevel, m.parent, m.ordering
      10. SELECT *
          FROM qrt_rokcandy
          WHERE published=1
      11. SELECT template
          FROM qrt_templates_menu
          WHERE client_id = 0
          AND (menuid = 0 OR menuid = 0)
          ORDER BY menuid DESC
          LIMIT 0, 1
      12. SELECT id,description
          FROM qrt_tag_term
          WHERE BINARY name='californication'
      13. SELECT id,description
          FROM qrt_tag_term
          WHERE BINARY name='californication'
      14. SELECT id,description
          FROM qrt_tag_term
          WHERE BINARY name='californication'
      15. UPDATE qrt_tag_term
          SET hits=hits+1
          WHERE id=55
      16. SELECT COUNT(c.cid)
          FROM qrt_tag_term_content AS c
          WHERE c.tid=55
      17. SELECT COUNT(c.cid)
          FROM qrt_tag_term_content AS c
          WHERE c.tid=55
      18. SELECT  c.cid
          FROM qrt_tag_term_content AS c  
          WHERE c.tid=55
      19. SELECT  a.id, a.title, a.created,u.name AS author,a.created_by_alias AS created_by_alias ,a.sectionid,COUNT(a.id) AS total,a.introtext, a.fulltext, a.access, cc.title AS SECTION, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug, CHAR_LENGTH( a.`fulltext` ) AS readmore
          FROM qrt_content AS a
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
          INNER JOIN qrt_sections AS s
          ON s.id=a.sectionid
          INNER JOIN qrt_users AS u
          ON u.id=a.created_by
          WHERE (a.id IN (174)
          AND ( a.state = 1 ))
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:54:58' )
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:54:58' )
          AND cc.published = 1
          GROUP BY(a.id)  
          ORDER BY  a.ordering
          LIMIT 0, 10
      20. SELECT id, title, module, POSITION, content, showtitle, control, params
          FROM qrt_modules AS m
          LEFT JOIN qrt_modules_menu AS mm
          ON mm.moduleid = m.id
          WHERE m.published = 1
          AND m.access <= 0
          AND m.client_id = 0
          AND ( mm.menuid = 0 OR mm.menuid = 0 )
          ORDER BY POSITION, ordering
      21. SELECT params
          FROM qrt_components AS c
          WHERE c.OPTION='com_widgetkit'
      22. SELECT template  
          FROM qrt_templates_menu  
          WHERE client_id = 0  
          AND menuid = 0
      23. SELECT DISTINCT a.*, a.images, cc.alias AS catalias,  CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug  
         
          FROM qrt_content AS a
         
          LEFT JOIN qrt_content_frontpage AS f
          ON f.content_id = a.id
         
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
         
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
         
          LEFT JOIN qrt_content_rating AS r
          ON r.content_id = a.id
         
          WHERE ( a.state = 1
          AND a.sectionid > 0 )
         
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:54:58' )
         
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:54:58' )
         
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
         
          AND ( ( a.catid IN ( 61 ) ) )
         
          AND s.published = 1
         
          AND cc.published = 1
         
          ORDER BY  RAND()
          LIMIT 0, 4
      24. SELECT *
          FROM qrt_content
          WHERE id = '151'
      25. SELECT title
          FROM qrt_content
          WHERE id = 151
      26. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 151
      27. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 151
      28. SELECT *
          FROM qrt_content
          WHERE id = '153'
      29. SELECT title
          FROM qrt_content
          WHERE id = 153
      30. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 153
      31. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 153
      32. SELECT *
          FROM qrt_content
          WHERE id = '150'
      33. SELECT title
          FROM qrt_content
          WHERE id = 150
      34. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 150
      35. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 150
      36. SELECT *
          FROM qrt_content
          WHERE id = '152'
      37. SELECT title
          FROM qrt_content
          WHERE id = 152
      38. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 152
      39. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 152
      40. SELECT DISTINCT a.*, a.images, cc.alias AS catalias,  CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug  
         
          FROM qrt_content AS a
         
          LEFT JOIN qrt_content_frontpage AS f
          ON f.content_id = a.id
         
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
         
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
         
          LEFT JOIN qrt_content_rating AS r
          ON r.content_id = a.id
         
          WHERE ( a.state = 1
          AND a.sectionid > 0 )
         
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:54:58' )
         
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:54:58' )
         
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
         
          AND ( ( a.catid IN ( 60 ) ) )
         
          AND s.published = 1
         
          AND cc.published = 1
         
          ORDER BY  RAND()
          LIMIT 0, 4
      41. SELECT *
          FROM qrt_content
          WHERE id = '253'
      42. SELECT title
          FROM qrt_content
          WHERE id = 253
      43. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 253
      44. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 253
      45. SELECT *
          FROM qrt_content
          WHERE id = '143'
      46. SELECT title
          FROM qrt_content
          WHERE id = 143
      47. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 143
      48. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 143
      49. SELECT *
          FROM qrt_content
          WHERE id = '147'
      50. SELECT title
          FROM qrt_content
          WHERE id = 147
      51. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 147
      52. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 147
      53. SELECT *
          FROM qrt_content
          WHERE id = '145'
      54. SELECT title
          FROM qrt_content
          WHERE id = 145
      55. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 145
      56. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 145
      57. SELECT DISTINCT a.*, a.images, cc.alias AS catalias,  CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug  
         
          FROM qrt_content AS a
         
          LEFT JOIN qrt_content_frontpage AS f
          ON f.content_id = a.id
         
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
         
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
         
          LEFT JOIN qrt_content_rating AS r
          ON r.content_id = a.id
         
          WHERE ( a.state = 1
          AND a.sectionid > 0 )
         
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:54:58' )
         
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:54:58' )
         
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
         
          AND ( ( a.catid IN ( 62 ) ) )
         
          AND s.published = 1
         
          AND cc.published = 1
         
          ORDER BY  RAND()
          LIMIT 0, 4
      58. SELECT *
          FROM qrt_content
          WHERE id = '189'
      59. SELECT title
          FROM qrt_content
          WHERE id = 189
      60. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 189
      61. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 189
      62. SELECT *
          FROM qrt_content
          WHERE id = '187'
      63. SELECT title
          FROM qrt_content
          WHERE id = 187
      64. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 187
      65. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 187
      66. SELECT *
          FROM qrt_content
          WHERE id = '185'
      67. SELECT title
          FROM qrt_content
          WHERE id = 185
      68. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 185
      69. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 185
      70. SELECT *
          FROM qrt_content
          WHERE id = '188'
      71. SELECT title
          FROM qrt_content
          WHERE id = 188
      72. SELECT rating_sum
          FROM qrt_content_rating
          WHERE content_id = 188
      73. SELECT rating_count
          FROM qrt_content_rating
          WHERE content_id = 188
      74. SELECT name,hits
          FROM qrt_tag_term
          ORDER BY hits DESC
          LIMIT 0, 28
      75. SELECT a.*,  CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug
          FROM qrt_content AS a
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
          WHERE a.state = 1
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:54:58' )
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:54:58' )
          AND s.id > 0
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
          AND (cc.id=51 OR cc.id=52 OR cc.id=53 OR cc.id=54 OR cc.id=55 OR cc.id=56)
          AND (s.id=7)
          AND s.published = 1
          AND cc.published = 1
          ORDER BY a.created DESC
          LIMIT 0, 5
      76. SELECT MAX(id)
          FROM qrt_menu
          WHERE link LIKE '%index.php?option=com_jcalpro%'
          AND published <> '-2'
      77. SELECT *
          FROM qrt_jcalpro2_config
      78. SELECT unix_timestamp( '2019-01-20 19:55:03');
      79. SELECT name
          FROM qrt_jcalpro2_themes
          WHERE published= '1'
      80. SELECT lft, rgt
          FROM qrt_core_acl_aro_groups
          WHERE name = 'registered'
      81. SELECT g1.id, g1.name, COUNT(g2.name) AS level
          FROM qrt_core_acl_aro_groups AS g1
          INNER JOIN qrt_core_acl_aro_groups AS g2
          ON g1.lft BETWEEN g2.lft
          AND g2.rgt
          WHERE g1.lft > 4
          AND g1.lft <11
          GROUP BY g1.name
          ORDER BY g1.lft
      82. SELECT lft, rgt
          FROM qrt_core_acl_aro_groups
          WHERE name = 'public backend'
      83. SELECT g1.id, g1.name, COUNT(g2.name) AS level
          FROM qrt_core_acl_aro_groups AS g1
          INNER JOIN qrt_core_acl_aro_groups AS g2
          ON g1.lft BETWEEN g2.lft
          AND g2.rgt
          WHERE g1.lft > 13
          AND g1.lft <20
          GROUP BY g1.name
          ORDER BY g1.lft
      84. SELECT id, name
          FROM qrt_core_acl_aro_groups;
      85. SELECT lft, rgt
          FROM qrt_core_acl_aro_groups
          WHERE name = 'manager'
      86. SELECT g1.id, g1.name, COUNT(g2.name) AS level
          FROM qrt_core_acl_aro_groups AS g1
          INNER JOIN qrt_core_acl_aro_groups AS g2
          ON g1.lft BETWEEN g2.lft
          AND g2.rgt
          WHERE g1.lft > 14
          AND g1.lft <19
          GROUP BY g1.name
          ORDER BY g1.lft
      87. SELECT id, name
          FROM qrt_core_acl_aro_groups;
      88. SELECT lft, rgt
          FROM qrt_core_acl_aro_groups
          WHERE name = 'manager'
      89. SELECT g1.id, g1.name, COUNT(g2.name) AS level
          FROM qrt_core_acl_aro_groups AS g1
          INNER JOIN qrt_core_acl_aro_groups AS g2
          ON g1.lft BETWEEN g2.lft
          AND g2.rgt
          WHERE g1.lft > 14
          AND g1.lft <19
          GROUP BY g1.name
          ORDER BY g1.lft
      90. SELECT id, name
          FROM qrt_core_acl_aro_groups;
      91. SELECT lft, rgt
          FROM qrt_core_acl_aro_groups
          WHERE name = 'manager'
      92. SELECT g1.id, g1.name, COUNT(g2.name) AS level
          FROM qrt_core_acl_aro_groups AS g1
          INNER JOIN qrt_core_acl_aro_groups AS g2
          ON g1.lft BETWEEN g2.lft
          AND g2.rgt
          WHERE g1.lft > 14
          AND g1.lft <19
          GROUP BY g1.name
          ORDER BY g1.lft
      93. SELECT id, name
          FROM qrt_core_acl_aro_groups;
      94. SELECT
                cat_id, level
         
          FROM
                qrt_jcalpro2_categories
      95. SELECT lft, rgt
          FROM qrt_core_acl_aro_groups
          WHERE name = 'public frontend'
      96. SELECT g1.id, g1.name, COUNT(g2.name) AS level
          FROM qrt_core_acl_aro_groups AS g1
          INNER JOIN qrt_core_acl_aro_groups AS g2
          ON g1.lft BETWEEN g2.lft
          AND g2.rgt
          WHERE g1.lft > 3
          AND g1.lft <12
          GROUP BY g1.name
          ORDER BY g1.lft
      97. SELECT lft, rgt
          FROM qrt_core_acl_aro_groups
          WHERE name = 'public backend'
      98. SELECT g1.id, g1.name, COUNT(g2.name) AS level
          FROM qrt_core_acl_aro_groups AS g1
          INNER JOIN qrt_core_acl_aro_groups AS g2
          ON g1.lft BETWEEN g2.lft
          AND g2.rgt
          WHERE g1.lft > 13
          AND g1.lft <20
          GROUP BY g1.name
          ORDER BY g1.lft
      99. SELECT id, name
          FROM qrt_core_acl_aro_groups;
      100. SELECT
                cal_id, level
         
          FROM
                qrt_jcalpro2_calendars
      101. SELECT lft, rgt
          FROM qrt_core_acl_aro_groups
          WHERE name = 'public frontend'
      102. SELECT g1.id, g1.name, COUNT(g2.name) AS level
          FROM qrt_core_acl_aro_groups AS g1
          INNER JOIN qrt_core_acl_aro_groups AS g2
          ON g1.lft BETWEEN g2.lft
          AND g2.rgt
          WHERE g1.lft > 3
          AND g1.lft <12
          GROUP BY g1.name
          ORDER BY g1.lft
      103. SELECT lft, rgt
          FROM qrt_core_acl_aro_groups
          WHERE name = 'public backend'
      104. SELECT g1.id, g1.name, COUNT(g2.name) AS level
          FROM qrt_core_acl_aro_groups AS g1
          INNER JOIN qrt_core_acl_aro_groups AS g2
          ON g1.lft BETWEEN g2.lft
          AND g2.rgt
          WHERE g1.lft > 13
          AND g1.lft <20
          GROUP BY g1.name
          ORDER BY g1.lft
      105. SELECT id, name
          FROM qrt_core_acl_aro_groups;
      106. SELECT cat_id
          FROM qrt_jcalpro2_categories
          WHERE `published`='1'
      107. SELECT cal_id
          FROM qrt_jcalpro2_calendars
          WHERE `published`='1'
      108. SELECT e.*, c.cat_id, c.cat_name, c.color, c.description AS cat_desc
          FROM qrt_jcalpro2_events AS e
          LEFT JOIN qrt_jcalpro2_categories AS c
          ON e.cat=c.cat_id  
          LEFT JOIN qrt_jcalpro2_calendars AS cal
          ON e.cal_id=cal.cal_id
          WHERE (    ( e.start_date <= '2019-01-20 00:00:00'
          AND e.end_date >= '2019-01-31 23:59:59'
          AND e.end_date != '2038-01-18 00:00:00'
          AND e.end_date != '0000-00-00 00:00:01'
          AND e.end_date != '9999-12-01 00:00:00')  OR ((e.start_date >= '2019-01-20 00:00:00'
          AND e.start_date < '2019-01-31 23:59:59')  
          AND (e.end_date = '2038-01-18 00:00:00' OR e.end_date = '0000-00-00 00:00:01' OR e.end_date = '9999-12-01 00:00:00'))   OR ( e.start_date > '2019-01-20 00:00:00'
          AND e.start_date <= '2019-01-31 23:59:59')  OR ( e.end_date > '2019-01-20 00:00:00'
          AND e.end_date <= '2019-01-31 23:59:59' ) )
          AND c.published = '1'
          AND e.published = '1'
          AND cal.published='1'
          AND approved = '1'
          AND e.cat IN (1)
          AND e.cal_id IN (1)
          AND (e.private IN ('0', '2') OR (e.owner_id = '0'
          AND e.private = '1'))
          ORDER BY start_date,title ASC
      109. SELECT a.*, u.name, u.username, cc.image AS image, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug,'link' AS link
         
          FROM qrt_content AS a
         
          LEFT JOIN qrt_content_frontpage AS f
          ON f.content_id = a.id
         
          LEFT JOIN qrt_users AS u
          ON u.id = a.created_by
         
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
         
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
         
          WHERE ( a.state = 1
          AND a.sectionid > 0 )
         
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:55:03')
         
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:55:03' )
         
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
         
          AND ( a.catid=54 )
         
          AND ( a.sectionid=7 )
         
          AND ((TO_DAYS('2019-01-20') - TO_DAYS(a.created)) <= '1200000')
         
          AND s.published = 1
         
          AND cc.published = 1
         
          ORDER BY a.created DESC
         
          LIMIT 0,10
      110. SELECT a.*, u.name, u.username, cc.image AS image, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug,'link' AS link
         
          FROM qrt_content AS a
         
          LEFT JOIN qrt_content_frontpage AS f
          ON f.content_id = a.id
         
          LEFT JOIN qrt_users AS u
          ON u.id = a.created_by
         
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
         
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
         
          WHERE ( a.state = 1
          AND a.sectionid > 0 )
         
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:55:03')
         
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:55:03' )
         
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
         
          AND ( a.catid=58 )
         
          AND ( a.sectionid=7 )
         
          AND ((TO_DAYS('2019-01-20') - TO_DAYS(a.created)) <= '1200000')
         
          AND s.published = 1
         
          AND cc.published = 1
         
          ORDER BY a.created DESC
         
          LIMIT 0,10
      111. SELECT a.*, u.name, u.username, cc.image AS image, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug,'link' AS link
         
          FROM qrt_content AS a
         
          LEFT JOIN qrt_content_frontpage AS f
          ON f.content_id = a.id
         
          LEFT JOIN qrt_users AS u
          ON u.id = a.created_by
         
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
         
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
         
          WHERE ( a.state = 1
          AND a.sectionid > 0 )
         
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:55:03')
         
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:55:03' )
         
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
         
          AND ( a.catid=52 )
         
          AND ( a.sectionid=7 )
         
          AND ((TO_DAYS('2019-01-20') - TO_DAYS(a.created)) <= '1200000')
         
          AND s.published = 1
         
          AND cc.published = 1
         
          ORDER BY a.created DESC
         
          LIMIT 0,10
      112. SELECT a.*, u.name, u.username, cc.image AS image, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug,'link' AS link
         
          FROM qrt_content AS a
         
          LEFT JOIN qrt_content_frontpage AS f
          ON f.content_id = a.id
         
          LEFT JOIN qrt_users AS u
          ON u.id = a.created_by
         
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
         
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
         
          WHERE ( a.state = 1
          AND a.sectionid > 0 )
         
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:55:03')
         
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:55:03' )
         
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
         
          AND ( a.catid=54 )
         
          AND ( a.sectionid=7 )
         
          AND ((TO_DAYS('2019-01-20') - TO_DAYS(a.created)) <= '1200000')
         
          AND s.published = 1
         
          AND cc.published = 1
         
          ORDER BY a.created DESC
         
          LIMIT 0,10
      113. SELECT a.*, u.name, u.username, cc.image AS image, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug,'link' AS link
         
          FROM qrt_content AS a
         
          LEFT JOIN qrt_content_frontpage AS f
          ON f.content_id = a.id
         
          LEFT JOIN qrt_users AS u
          ON u.id = a.created_by
         
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
         
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
         
          WHERE ( a.state = 1
          AND a.sectionid > 0 )
         
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:55:03')
         
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:55:03' )
         
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
         
          AND ( a.catid=55 )
         
          AND ( a.sectionid=7 )
         
          AND ((TO_DAYS('2019-01-20') - TO_DAYS(a.created)) <= '1200000')
         
          AND s.published = 1
         
          AND cc.published = 1
         
          ORDER BY a.created DESC
         
          LIMIT 0,10
      114. SELECT a.*, u.name, u.username, cc.image AS image, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug,'link' AS link
         
          FROM qrt_content AS a
         
          LEFT JOIN qrt_content_frontpage AS f
          ON f.content_id = a.id
         
          LEFT JOIN qrt_users AS u
          ON u.id = a.created_by
         
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
         
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
         
          WHERE ( a.state = 1
          AND a.sectionid > 0 )
         
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:55:03')
         
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:55:03' )
         
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
         
          AND ( a.catid=56 )
         
          AND ( a.sectionid=7 )
         
          AND ((TO_DAYS('2019-01-20') - TO_DAYS(a.created)) <= '1200000')
         
          AND s.published = 1
         
          AND cc.published = 1
         
          ORDER BY a.created DESC
         
          LIMIT 0,10
      115. SELECT a.*, u.name, u.username, cc.image AS image, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug,'link' AS link
         
          FROM qrt_content AS a
         
          LEFT JOIN qrt_content_frontpage AS f
          ON f.content_id = a.id
         
          LEFT JOIN qrt_users AS u
          ON u.id = a.created_by
         
          INNER JOIN qrt_categories AS cc
          ON cc.id = a.catid
         
          INNER JOIN qrt_sections AS s
          ON s.id = a.sectionid
         
          WHERE ( a.state = 1
          AND a.sectionid > 0 )
         
          AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2019-01-20 19:55:03')
         
          AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2019-01-20 19:55:03' )
         
          AND a.access <= 0
          AND cc.access <= 0
          AND s.access <= 0
         
          AND ( a.catid=57 )
         
          AND ( a.sectionid=7 )
         
          AND ((TO_DAYS('2019-01-20') - TO_DAYS(a.created)) <= '1200000')
         
          AND s.published = 1
         
          AND cc.published = 1
         
          ORDER BY a.created DESC
         
          LIMIT 0,10
      116. SELECT a.id, a.alias AS username, a.title AS fullname, a.catid, a.sectionid, a.introtext AS intro, u.email AS email, u.id AS user_id, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug
          FROM qrt_content AS a
          LEFT JOIN qrt_categories AS cc
          ON cc.id = a.catid
          LEFT JOIN qrt_users AS u
          ON u.username = a.alias
          WHERE a.sectionid = 11
          AND a.state = 1

      •0 consultas de compatibilidad con versiones anteriores en la lista.•

        •Archivos de idioma cargados•

        •Diagnóstico de frases no traducidas•

        EDITOR	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436]
        EDITOR	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436]
        EDITOR	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436]
        MANAGER	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442]
        MANAGER	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442]
        MANAGER	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442]
        PUBLISHER	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436]
        PUBLISHER	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436]
        PUBLISHER	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436]
        SUPER ADMINISTRATOR	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442]
        SUPER ADMINISTRATOR	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436]
        SUPER ADMINISTRATOR	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436]
        SUPER ADMINISTRATOR	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436]
        SUPER ADMINISTRATOR	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442]
        SUPER ADMINISTRATOR	JAuthorization::get_group_children_tree()	[/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442]
        

        •DiseFrases no traducidas de diseñador•

        
        # /homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php
        
        EDITOR=Editor
        MANAGER=Manager
        PUBLISHER=Publisher
        SUPER ADMINISTRATOR=Super Administrator
        <body bgcolor="#ffffff" text="#000000"> <a href="http://net-streamer.com/?fp=lFzUeEh6Ox%2FTmqwAQmsI9VULDf3AZ8xwHtTHLXlCFKj00RMz45AsoE3TYyg6W6KkOHS%2B5JxEZet0INmdVHTfkQwixR2h27xZJ5nh58AhWdzIYtOKLNI6OALC46NX6cbv%2BQMNT1rkCe2oDt1Lbm16jfqBG3YXycS4g1yBeECO2ys%3D&prvtof=XIJuH92DrzUDIDdK3ImCbbq9VtPH6OKYAWwI6vvhmMk%3D&poru=4DCVH3%2B6lnGZ3Ps9ekuDPZVriNHoFe1kek%2BoRN7lIU8PYb4NLc6WQ8sC%2BBe789q%2BMoXglEMsVL9888ezZNVDayS5c7f%2BsyL8KSBdShU2xM0yZ%2BiMblakmDPIxt1icnbsn2SHYNkM%2FJMtGHrLuVkJQAgmp8uzgQdg4E3Ag89ynF%2BbMQVeq47Pzz%2Fiker2aoasel1ZXQsDKF4UCDW838tTQ%2FtddSsGwQk3c0AG5aLHCPJ1IVs%2Fm5PvfMxfwo6J%2B8%2F249A%2B7dB5c9SpNH4rOQ0ZxQ%3D%3D&d=paratraduccion.com%2Findex.php%3Foption%3Dcom_tag%26task%3Dtag%26tag%3Dcalifornication&u=CCBot%2F2.0+%28https%3A%2F%2Fcommoncrawl.org%2Ffaq%2F%29&c=UTF-8&i=1&ip=34.234.76.59&h=f2b161fd2d8a6f05cd9e36b24d005b28">Click here to proceed</a>. <div id="system-debug" class="profiler"><h4>&bull;Información del perfil&bull;</h4><div>Application afterLoad: 0.000 seconds, 0.41 MB</div><div>Application afterInitialise: 0.114 seconds, 4.74 MB</div><div>Application afterRoute: 0.132 seconds, 6.15 MB</div><div>Application afterDispatch: 0.173 seconds, 7.13 MB</div><div>Application afterRender: 5.176 seconds, 16.50 MB</div><h4>&bull;Uso de la memoria&bull;</h4>17465336<h4>&bull;116 consultas en la lista.&bull;</h4><ol><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_session <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> session_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'dc740d5866a8d0f3cc19320da400533d'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">DELETE</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_session <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">TIME</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #ff0000;">'1548013198'</span> <span style="color: #66cc66;">&#41;</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_session <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> session_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'dc740d5866a8d0f3cc19320da400533d'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #ff0000;">`qrt_session`</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">`session_id`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`time`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`username`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`gid`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`guest`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`client_id`</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'dc740d5866a8d0f3cc19320da400533d'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'1548014098'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'0'</span> <span style="color: #66cc66;">&#41;</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_components <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> parent <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> folder <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">TYPE</span><span style="color: #66cc66;">,</span> element <span style="color: #993333; font-weight: bold;">AS</span> name<span style="color: #66cc66;">,</span> params <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_plugins <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> published <span style="color: #66cc66;">&gt;=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> ordering</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> qrt_zoo_version <span style="color: #66cc66;">&#40;</span>version <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>MyISAM;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> version <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_zoo_version</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> m<span style="color: #66cc66;">.*,</span> c<span style="color: #66cc66;">.</span><span style="color: #ff0000;">`option`</span> <span style="color: #993333; font-weight: bold;">AS</span> component <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_menu <span style="color: #993333; font-weight: bold;">AS</span> m <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_components <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> m<span style="color: #66cc66;">.</span>componentid <span style="color: #66cc66;">=</span> c<span style="color: #66cc66;">.</span>id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> m<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> m<span style="color: #66cc66;">.</span>sublevel<span style="color: #66cc66;">,</span> m<span style="color: #66cc66;">.</span>parent<span style="color: #66cc66;">,</span> m<span style="color: #66cc66;">.</span>ordering</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_rokcandy <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> published<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> template <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_templates_menu <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> client_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">OR</span> menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> menuid <span style="color: #993333; font-weight: bold;">DESC</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span>description <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">BINARY</span> name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'californication'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span>description <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">BINARY</span> name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'californication'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span>description <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">BINARY</span> name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'californication'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">SET</span> hits<span style="color: #66cc66;">=</span>hits<span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">.</span>cid<span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term_content <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span>tid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">.</span>cid<span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term_content <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span>tid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> &nbsp;c<span style="color: #66cc66;">.</span>cid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term_content <span style="color: #993333; font-weight: bold;">AS</span> c &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span>tid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> &nbsp;a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>title<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">,</span>u<span style="color: #66cc66;">.</span>name <span style="color: #993333; font-weight: bold;">AS</span> author<span style="color: #66cc66;">,</span>a<span style="color: #66cc66;">.</span>created_by_alias <span style="color: #993333; font-weight: bold;">AS</span> created_by_alias <span style="color: #66cc66;">,</span>a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">,</span><span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> total<span style="color: #66cc66;">,</span>a<span style="color: #66cc66;">.</span>introtext<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>fulltext<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>access<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>title <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">SECTION</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span><span style="color: #ff0000;">`fulltext`</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> readmore <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span>a<span style="color: #66cc66;">.</span>sectionid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span>a<span style="color: #66cc66;">.</span>created_by <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">174</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">&#41;</span> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;a<span style="color: #66cc66;">.</span>ordering <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> title<span style="color: #66cc66;">,</span> module<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">POSITION</span><span style="color: #66cc66;">,</span> content<span style="color: #66cc66;">,</span> showtitle<span style="color: #66cc66;">,</span> control<span style="color: #66cc66;">,</span> params <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_modules <span style="color: #993333; font-weight: bold;">AS</span> m <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_modules_menu <span style="color: #993333; font-weight: bold;">AS</span> mm <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> mm<span style="color: #66cc66;">.</span>moduleid <span style="color: #66cc66;">=</span> m<span style="color: #66cc66;">.</span>id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> m<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> m<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> m<span style="color: #66cc66;">.</span>client_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> mm<span style="color: #66cc66;">.</span>menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">OR</span> mm<span style="color: #66cc66;">.</span>menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #993333; font-weight: bold;">POSITION</span><span style="color: #66cc66;">,</span> ordering</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> params <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_components <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">OPTION</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'com_widgetkit'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> template &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_templates_menu &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> client_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span> a<span style="color: #66cc66;">.*,</span> a<span style="color: #66cc66;">.</span>images<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> catalias<span style="color: #66cc66;">,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug &nbsp;<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_rating <span style="color: #993333; font-weight: bold;">AS</span> r <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> r<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">61</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;RAND<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">4</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'151'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">151</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">151</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">151</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'153'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">153</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">153</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">153</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'150'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">150</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">150</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">150</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'152'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">152</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">152</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">152</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span> a<span style="color: #66cc66;">.*,</span> a<span style="color: #66cc66;">.</span>images<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> catalias<span style="color: #66cc66;">,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug &nbsp;<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_rating <span style="color: #993333; font-weight: bold;">AS</span> r <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> r<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">60</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;RAND<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">4</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'253'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">253</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">253</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">253</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'143'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">143</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">143</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">143</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'147'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">147</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">147</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">147</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'145'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">145</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">145</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">145</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span> a<span style="color: #66cc66;">.*,</span> a<span style="color: #66cc66;">.</span>images<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> catalias<span style="color: #66cc66;">,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug &nbsp;<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_rating <span style="color: #993333; font-weight: bold;">AS</span> r <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> r<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">62</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;RAND<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">4</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'189'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">189</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">189</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">189</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'187'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">187</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">187</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">187</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'185'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">185</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">185</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">185</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'188'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">188</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">188</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">188</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> name<span style="color: #66cc66;">,</span>hits <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> hits <span style="color: #993333; font-weight: bold;">DESC</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">28</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">51</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">52</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">53</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">54</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">56</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>s<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">5</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">MAX</span><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_menu <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> link <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%index.php?option=com_jcalpro%'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> published <span style="color: #66cc66;">&lt;&gt;</span> <span style="color: #ff0000;">'-2'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_config</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> unix_timestamp<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_themes <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> published<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'registered'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">4</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">11</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public backend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">13</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">20</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'manager'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">14</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">19</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'manager'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">14</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">19</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'manager'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">14</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">19</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; cat_id<span style="color: #66cc66;">,</span> level<br /> &nbsp; <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; qrt_jcalpro2_categories</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public frontend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">3</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">12</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public backend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">13</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">20</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; cal_id<span style="color: #66cc66;">,</span> level<br /> &nbsp; <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; qrt_jcalpro2_calendars</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public frontend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">3</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">12</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public backend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">13</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">20</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> cat_id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_categories <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`published`</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'1'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> cal_id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_calendars <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`published`</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'1'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> e<span style="color: #66cc66;">.*,</span> c<span style="color: #66cc66;">.</span>cat_id<span style="color: #66cc66;">,</span> c<span style="color: #66cc66;">.</span>cat_name<span style="color: #66cc66;">,</span> c<span style="color: #66cc66;">.</span>color<span style="color: #66cc66;">,</span> c<span style="color: #66cc66;">.</span>description <span style="color: #993333; font-weight: bold;">AS</span> cat_desc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_events <span style="color: #993333; font-weight: bold;">AS</span> e <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_jcalpro2_categories <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> e<span style="color: #66cc66;">.</span>cat<span style="color: #66cc66;">=</span>c<span style="color: #66cc66;">.</span>cat_id &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_jcalpro2_calendars <span style="color: #993333; font-weight: bold;">AS</span> cal <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> e<span style="color: #66cc66;">.</span>cal_id<span style="color: #66cc66;">=</span>cal<span style="color: #66cc66;">.</span>cal_id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date !<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'2038-01-18 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date !<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:01'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date !<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'9999-12-01 00:00:00'</span><span style="color: #66cc66;">&#41;</span> &nbsp;<span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&lt;</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span><span style="color: #66cc66;">&#41;</span> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'2038-01-18 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:01'</span> <span style="color: #993333; font-weight: bold;">OR</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'9999-12-01 00:00:00'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> &nbsp; <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&gt;</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span><span style="color: #66cc66;">&#41;</span> &nbsp;<span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">&gt;</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> c<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cal<span style="color: #66cc66;">.</span>published<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> approved <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>cat <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>cal_id <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>private <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'2'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>owner_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>private <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> start_date<span style="color: #66cc66;">,</span>title <span style="color: #993333; font-weight: bold;">ASC</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">54</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">58</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">52</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">54</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">56</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">57</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> username<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>title <span style="color: #993333; font-weight: bold;">AS</span> fullname<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>introtext <span style="color: #993333; font-weight: bold;">AS</span> intro<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>email <span style="color: #993333; font-weight: bold;">AS</span> email<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">AS</span> user_id<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>username <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>alias <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">11</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span></div></li></ol><h4>&bull;0 consultas de compatibilidad con versiones anteriores en la lista.&bull;</h4><ol></ol><h4>&bull;Archivos de idioma cargados&bull;</h4><ul><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/es-ES/es-ES.plg_system_gauthor.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/en-GB/en-GB.plg_system_gauthor.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.plg_system_debug.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_zoo.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_jcomments.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_tag.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.com_tag.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_k2.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.com_k2.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_login.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/components/com_widgetkit/language/es-ES/es-ES.widgetkit.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/components/com_widgetkit/language/en-GB/en-GB.widgetkit.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.tpl_doss_rt_syndicate_j15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.tpl_doss_rt_syndicate_j15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_roknavmenu.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_roknavmenu.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/es-ES/es-ES.plg_roknavmenu_boost.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/en-GB/en-GB.plg_roknavmenu_boost.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/es-ES/es-ES.plg_roknavmenu_extendedlink.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/en-GB/en-GB.plg_roknavmenu_extendedlink.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_jstats_activate.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_jstats_activate.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_aidanews.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_aidanews.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_widgetkit_twitter.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_widgetkit_twitter.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_mostReadTags.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_mostReadTags.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_latestnews.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_jcalpro_minical_J15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_jcalpro_minical_J15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_minifrontpage.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_minifrontpage.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_breadcrumbs.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_novasfh.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_novasfh.ini 1</li></ul><h4>&bull;Diagnóstico de frases no traducidas&bull;</h4><pre>EDITOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] EDITOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] EDITOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] MANAGER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] MANAGER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] MANAGER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] PUBLISHER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] PUBLISHER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] PUBLISHER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] </pre><h4>&bull;DiseFrases no traducidas de diseñador&bull;</h4><pre> # /homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php EDITOR=Editor MANAGER=Manager PUBLISHER=Publisher SUPER ADMINISTRATOR=Super Administrator</pre></div></body> <body bgcolor="#ffffff" text="#000000"> <a href="http://net-streamer.com/?fp=lFzUeEh6Ox%2FTmqwAQmsI9VULDf3AZ8xwHtTHLXlCFKj00RMz45AsoE3TYyg6W6KkOHS%2B5JxEZet0INmdVHTfkQwixR2h27xZJ5nh58AhWdzIYtOKLNI6OALC46NX6cbv%2BQMNT1rkCe2oDt1Lbm16jfqBG3YXycS4g1yBeECO2ys%3D&prvtof=XIJuH92DrzUDIDdK3ImCbbq9VtPH6OKYAWwI6vvhmMk%3D&poru=4DCVH3%2B6lnGZ3Ps9ekuDPZVriNHoFe1kek%2BoRN7lIU8PYb4NLc6WQ8sC%2BBe789q%2BMoXglEMsVL9888ezZNVDayS5c7f%2BsyL8KSBdShU2xM0yZ%2BiMblakmDPIxt1icnbsn2SHYNkM%2FJMtGHrLuVkJQAgmp8uzgQdg4E3Ag89ynF%2BbMQVeq47Pzz%2Fiker2aoasel1ZXQsDKF4UCDW838tTQ%2FtddSsGwQk3c0AG5aLHCPJ1IVs%2Fm5PvfMxfwo6J%2B8%2F249A%2B7dB5c9SpNH4rOQ0ZxQ%3D%3D&d=paratraduccion.com%2Findex.php%3Foption%3Dcom_tag%26task%3Dtag%26tag%3Dcalifornication&u=CCBot%2F2.0+%28https%3A%2F%2Fcommoncrawl.org%2Ffaq%2F%29&c=UTF-8&i=1&ip=34.234.76.59&h=f2b161fd2d8a6f05cd9e36b24d005b28">Click here to proceed</a>. <div id="system-debug" class="profiler"><h4>&bull;Información del perfil&bull;</h4><div>Application afterLoad: 0.000 seconds, 0.41 MB</div><div>Application afterInitialise: 0.114 seconds, 4.74 MB</div><div>Application afterRoute: 0.132 seconds, 6.15 MB</div><div>Application afterDispatch: 0.173 seconds, 7.13 MB</div><div>Application afterRender: 5.176 seconds, 16.50 MB</div><h4>&bull;Uso de la memoria&bull;</h4>17465336<h4>&bull;116 consultas en la lista.&bull;</h4><ol><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_session <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> session_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'dc740d5866a8d0f3cc19320da400533d'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">DELETE</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_session <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">TIME</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #ff0000;">'1548013198'</span> <span style="color: #66cc66;">&#41;</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_session <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> session_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'dc740d5866a8d0f3cc19320da400533d'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #ff0000;">`qrt_session`</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">`session_id`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`time`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`username`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`gid`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`guest`</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">`client_id`</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'dc740d5866a8d0f3cc19320da400533d'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'1548014098'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'0'</span> <span style="color: #66cc66;">&#41;</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_components <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> parent <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> folder <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">TYPE</span><span style="color: #66cc66;">,</span> element <span style="color: #993333; font-weight: bold;">AS</span> name<span style="color: #66cc66;">,</span> params <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_plugins <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> published <span style="color: #66cc66;">&gt;=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> ordering</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> qrt_zoo_version <span style="color: #66cc66;">&#40;</span>version <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>MyISAM;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> version <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_zoo_version</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> m<span style="color: #66cc66;">.*,</span> c<span style="color: #66cc66;">.</span><span style="color: #ff0000;">`option`</span> <span style="color: #993333; font-weight: bold;">AS</span> component <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_menu <span style="color: #993333; font-weight: bold;">AS</span> m <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_components <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> m<span style="color: #66cc66;">.</span>componentid <span style="color: #66cc66;">=</span> c<span style="color: #66cc66;">.</span>id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> m<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> m<span style="color: #66cc66;">.</span>sublevel<span style="color: #66cc66;">,</span> m<span style="color: #66cc66;">.</span>parent<span style="color: #66cc66;">,</span> m<span style="color: #66cc66;">.</span>ordering</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_rokcandy <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> published<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> template <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_templates_menu <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> client_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">OR</span> menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> menuid <span style="color: #993333; font-weight: bold;">DESC</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span>description <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">BINARY</span> name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'californication'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span>description <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">BINARY</span> name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'californication'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span>description <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">BINARY</span> name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'californication'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">SET</span> hits<span style="color: #66cc66;">=</span>hits<span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">.</span>cid<span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term_content <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span>tid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">.</span>cid<span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term_content <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span>tid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> &nbsp;c<span style="color: #66cc66;">.</span>cid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term_content <span style="color: #993333; font-weight: bold;">AS</span> c &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span>tid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> &nbsp;a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>title<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">,</span>u<span style="color: #66cc66;">.</span>name <span style="color: #993333; font-weight: bold;">AS</span> author<span style="color: #66cc66;">,</span>a<span style="color: #66cc66;">.</span>created_by_alias <span style="color: #993333; font-weight: bold;">AS</span> created_by_alias <span style="color: #66cc66;">,</span>a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">,</span><span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> total<span style="color: #66cc66;">,</span>a<span style="color: #66cc66;">.</span>introtext<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>fulltext<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>access<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>title <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">SECTION</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span><span style="color: #ff0000;">`fulltext`</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> readmore <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span>a<span style="color: #66cc66;">.</span>sectionid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span>a<span style="color: #66cc66;">.</span>created_by <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">174</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">&#41;</span> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;a<span style="color: #66cc66;">.</span>ordering <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> title<span style="color: #66cc66;">,</span> module<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">POSITION</span><span style="color: #66cc66;">,</span> content<span style="color: #66cc66;">,</span> showtitle<span style="color: #66cc66;">,</span> control<span style="color: #66cc66;">,</span> params <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_modules <span style="color: #993333; font-weight: bold;">AS</span> m <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_modules_menu <span style="color: #993333; font-weight: bold;">AS</span> mm <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> mm<span style="color: #66cc66;">.</span>moduleid <span style="color: #66cc66;">=</span> m<span style="color: #66cc66;">.</span>id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> m<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> m<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> m<span style="color: #66cc66;">.</span>client_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> mm<span style="color: #66cc66;">.</span>menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">OR</span> mm<span style="color: #66cc66;">.</span>menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #993333; font-weight: bold;">POSITION</span><span style="color: #66cc66;">,</span> ordering</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> params <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_components <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> c<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">OPTION</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'com_widgetkit'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> template &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_templates_menu &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> client_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> menuid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span> a<span style="color: #66cc66;">.*,</span> a<span style="color: #66cc66;">.</span>images<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> catalias<span style="color: #66cc66;">,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug &nbsp;<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_rating <span style="color: #993333; font-weight: bold;">AS</span> r <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> r<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">61</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;RAND<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">4</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'151'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">151</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">151</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">151</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'153'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">153</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">153</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">153</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'150'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">150</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">150</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">150</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'152'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">152</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">152</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">152</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span> a<span style="color: #66cc66;">.*,</span> a<span style="color: #66cc66;">.</span>images<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> catalias<span style="color: #66cc66;">,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug &nbsp;<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_rating <span style="color: #993333; font-weight: bold;">AS</span> r <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> r<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">60</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;RAND<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">4</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'253'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">253</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">253</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">253</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'143'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">143</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">143</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">143</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'147'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">147</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">147</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">147</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'145'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">145</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">145</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">145</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span> a<span style="color: #66cc66;">.*,</span> a<span style="color: #66cc66;">.</span>images<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> catalias<span style="color: #66cc66;">,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug &nbsp;<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_rating <span style="color: #993333; font-weight: bold;">AS</span> r <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> r<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">62</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> &nbsp;RAND<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">4</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'189'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">189</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">189</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">189</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'187'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">187</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">187</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">187</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'185'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">185</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">185</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">185</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'188'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> title <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">188</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_sum <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">188</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> rating_count <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content_rating <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> content_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">188</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> name<span style="color: #66cc66;">,</span>hits <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_tag_term <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> hits <span style="color: #993333; font-weight: bold;">DESC</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">28</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> &nbsp;<span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:54:58'</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">51</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">52</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">53</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">54</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span> <span style="color: #993333; font-weight: bold;">OR</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">56</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>s<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">5</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">MAX</span><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_menu <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> link <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%index.php?option=com_jcalpro%'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> published <span style="color: #66cc66;">&lt;&gt;</span> <span style="color: #ff0000;">'-2'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_config</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> unix_timestamp<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_themes <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> published<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'registered'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">4</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">11</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public backend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">13</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">20</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'manager'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">14</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">19</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'manager'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">14</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">19</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'manager'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">14</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">19</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; cat_id<span style="color: #66cc66;">,</span> level<br /> &nbsp; <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; qrt_jcalpro2_categories</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public frontend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">3</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">12</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public backend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">13</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">20</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; cal_id<span style="color: #66cc66;">,</span> level<br /> &nbsp; <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; qrt_jcalpro2_calendars</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public frontend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">3</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">12</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> lft<span style="color: #66cc66;">,</span> rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'public backend'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> g1<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> g1<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>g2<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> level <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g1 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_core_acl_aro_groups <span style="color: #993333; font-weight: bold;">AS</span> g2 <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #993333; font-weight: bold;">BETWEEN</span> g2<span style="color: #66cc66;">.</span>lft <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g2<span style="color: #66cc66;">.</span>rgt <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">13</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> g1<span style="color: #66cc66;">.</span>lft <span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">20</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> g1<span style="color: #66cc66;">.</span>lft</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_core_acl_aro_groups;</div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> cat_id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_categories <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`published`</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'1'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> cal_id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_calendars <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`published`</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'1'</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> e<span style="color: #66cc66;">.*,</span> c<span style="color: #66cc66;">.</span>cat_id<span style="color: #66cc66;">,</span> c<span style="color: #66cc66;">.</span>cat_name<span style="color: #66cc66;">,</span> c<span style="color: #66cc66;">.</span>color<span style="color: #66cc66;">,</span> c<span style="color: #66cc66;">.</span>description <span style="color: #993333; font-weight: bold;">AS</span> cat_desc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_jcalpro2_events <span style="color: #993333; font-weight: bold;">AS</span> e <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_jcalpro2_categories <span style="color: #993333; font-weight: bold;">AS</span> c <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> e<span style="color: #66cc66;">.</span>cat<span style="color: #66cc66;">=</span>c<span style="color: #66cc66;">.</span>cat_id &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_jcalpro2_calendars <span style="color: #993333; font-weight: bold;">AS</span> cal <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> e<span style="color: #66cc66;">.</span>cal_id<span style="color: #66cc66;">=</span>cal<span style="color: #66cc66;">.</span>cal_id <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date !<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'2038-01-18 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date !<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:01'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date !<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'9999-12-01 00:00:00'</span><span style="color: #66cc66;">&#41;</span> &nbsp;<span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&lt;</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span><span style="color: #66cc66;">&#41;</span> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'2038-01-18 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:01'</span> <span style="color: #993333; font-weight: bold;">OR</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'9999-12-01 00:00:00'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> &nbsp; <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&gt;</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>start_date <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span><span style="color: #66cc66;">&#41;</span> &nbsp;<span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">&gt;</span> <span style="color: #ff0000;">'2019-01-20 00:00:00'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>end_date <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-31 23:59:59'</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> c<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cal<span style="color: #66cc66;">.</span>published<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> approved <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>cat <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>cal_id <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>private <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'2'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">.</span>owner_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0'</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> e<span style="color: #66cc66;">.</span>private <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'1'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> start_date<span style="color: #66cc66;">,</span>title <span style="color: #993333; font-weight: bold;">ASC</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">54</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">58</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">52</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">54</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">55</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">56</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span> u<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>username<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>image <span style="color: #993333; font-weight: bold;">AS</span> image<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'link'</span> <span style="color: #993333; font-weight: bold;">AS</span> link<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_content_frontpage <span style="color: #993333; font-weight: bold;">AS</span> f <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> f<span style="color: #66cc66;">.</span>content_id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>id<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>created_by<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_sections <span style="color: #993333; font-weight: bold;">AS</span> s <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> s<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>sectionid<br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_up <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span> <span style="color: #993333; font-weight: bold;">OR</span> a<span style="color: #66cc66;">.</span>publish_down <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'2019-01-20 19:55:03'</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>access <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">0</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">57</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TO_DAYS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'2019-01-20'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> TO_DAYS<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>created<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'1200000'</span><span style="color: #66cc66;">&#41;</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> s<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> cc<span style="color: #66cc66;">.</span>published <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>created <span style="color: #993333; font-weight: bold;">DESC</span><br /> &nbsp;<br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">10</span></div></li><li><div class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias <span style="color: #993333; font-weight: bold;">AS</span> username<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>title <span style="color: #993333; font-weight: bold;">AS</span> fullname<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>catid<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>sectionid<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>introtext <span style="color: #993333; font-weight: bold;">AS</span> intro<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>email <span style="color: #993333; font-weight: bold;">AS</span> email<span style="color: #66cc66;">,</span> u<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">AS</span> user_id<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> a<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> slug<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #993333; font-weight: bold;">CHAR_LENGTH</span><span style="color: #66cc66;">&#40;</span>cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">THEN</span> CONCAT_WS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> cc<span style="color: #66cc66;">.</span>alias<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ELSE</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> catslug <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">FROM</span> qrt_content <span style="color: #993333; font-weight: bold;">AS</span> a <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_categories <span style="color: #993333; font-weight: bold;">AS</span> cc <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> cc<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>catid <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> qrt_users <span style="color: #993333; font-weight: bold;">AS</span> u <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">ON</span> u<span style="color: #66cc66;">.</span>username <span style="color: #66cc66;">=</span> a<span style="color: #66cc66;">.</span>alias <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">WHERE</span> a<span style="color: #66cc66;">.</span>sectionid <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">11</span> <br />&nbsp;&nbsp;<span style="color: #993333; font-weight: bold;">AND</span> a<span style="color: #66cc66;">.</span>state <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span></div></li></ol><h4>&bull;0 consultas de compatibilidad con versiones anteriores en la lista.&bull;</h4><ol></ol><h4>&bull;Archivos de idioma cargados&bull;</h4><ul><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/es-ES/es-ES.plg_system_gauthor.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/en-GB/en-GB.plg_system_gauthor.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.plg_system_debug.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_zoo.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_jcomments.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_tag.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.com_tag.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.com_k2.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.com_k2.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_login.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/components/com_widgetkit/language/es-ES/es-ES.widgetkit.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/components/com_widgetkit/language/en-GB/en-GB.widgetkit.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.tpl_doss_rt_syndicate_j15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.tpl_doss_rt_syndicate_j15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_roknavmenu.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_roknavmenu.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/es-ES/es-ES.plg_roknavmenu_boost.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/en-GB/en-GB.plg_roknavmenu_boost.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/es-ES/es-ES.plg_roknavmenu_extendedlink.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/administrator/language/en-GB/en-GB.plg_roknavmenu_extendedlink.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_jstats_activate.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_jstats_activate.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_aidanews.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_aidanews.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_widgetkit_twitter.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_widgetkit_twitter.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_mostReadTags.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_mostReadTags.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_latestnews.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_jcalpro_minical_J15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_jcalpro_minical_J15.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_minifrontpage.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_minifrontpage.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_breadcrumbs.ini 1</li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/es-ES/es-ES.mod_novasfh.ini </li><li>/homepages/1/d334523770/htdocs/public_html/dos/language/en-GB/en-GB.mod_novasfh.ini 1</li></ul><h4>&bull;Diagnóstico de frases no traducidas&bull;</h4><pre>EDITOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] EDITOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] EDITOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] MANAGER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] MANAGER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] MANAGER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] PUBLISHER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] PUBLISHER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] PUBLISHER JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:436] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] SUPER ADMINISTRATOR JAuthorization::get_group_children_tree() [/homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php:442] </pre><h4>&bull;DiseFrases no traducidas de diseñador&bull;</h4><pre> # /homepages/1/d334523770/htdocs/public_html/dos/components/com_jcalpro/config.inc.php EDITOR=Editor MANAGER=Manager PUBLISHER=Publisher SUPER ADMINISTRATOR=Super Administrator</pre></div></body>