CA
EN
ES
Inici
Actualitat
L'Ajuntament
Persones
Temes
Tràmits
Contacte
SELECT a.id, a.title, a.alias, a.introtext, a.checked_out, a.checked_out_time, a.catid, a.created, a.created_by, a.created_by_alias, CASE WHEN a.modified = 0 THEN a.created ELSE a.modified END as modified, a.modified_by, a.language, CASE WHEN a.publish_up = 0 THEN a.created ELSE a.publish_up END as publish_up,a.publish_down, a.images, a.urls, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, a.hits, a.xreference, a.featured,a.state,a.created,a.created_by,cc.title AS category_title, cc.path AS category_route, cc.access AS category_access, cc.alias AS category_alias FROM #__content AS a INNER JOIN #__categories AS cc ON cc.id = a.catid WHERE a.state = 1 AND ((a.publish_down<>'0000-00-00 00:00:00' and (((a.created<'2017-03-31 00:00:00' and a.publish_down>='2017-03-30 00:00:00') or (a.created<'2017-03-31 00:00:00' and a.publish_down>='2017-03-31 00:00:00')) AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2018-04-23 13:22:27' ) AND a.publish_down >= '2018-04-23 13:22:27')) or (a.publish_down='0000-00-00 00:00:00' and (a.created >= '2017-03-30 00:00:00' AND a.created < '2017-03-31 00:00:00' AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2018-04-23 13:22:27' )))) AND (not a.metakey like '%cod:4230-%' and not a.metakey like '%cod:4104-%' and not a.metakey like '%cod:4105-%') AND a.language IN ('ca-ES','*') AND a.access IN (1,1,5) AND cc.published = 1 AND (cc.id=174) ORDER BY if (date_format(a.created,'%Y%m%d')=date_format( '2017-03-30 00:00:00','%Y%m%d') and (date_format(a.created,'%Y%m%d')=date_format(a.publish_down, '%Y%m%d') or a.publish_down is null) ,0,1), a.ordering ASC
30 Març 2017