I´m trying to list a free object table, it say no results but it´s wrong. I have debug the query and is:
SELECT t0.id as pid, t0.pk as pk, t0.pkb as pkb,t0.cck as cck, t0.storage_location as loc,tt.id AS type_id, tt.alias AS type_alias
FROM `#__cck_core` AS t0
LEFT JOIN `#__rede_docencia` AS t1 ON t1.id = t0.pk
LEFT JOIN `#__content` AS t2 ON t2.id = t0.pk
LEFT JOIN `#__cck_core_types` AS tt ON tt.name = t0.cck
WHERE t2.state = 1 AND t2.access IN (1,1) AND ( t2.publish_up = '0000-00-00 00:00:00' OR t2.publish_up <= '2014-03-26 09:33:53' ) AND ( t2.publish_down = '0000-00-00 00:00:00' OR t2.publish_down >= '2014-03-26 09:33:53' ) AND t0.cck = 'rede' AND t1.Ativo REGEXP "(::activo::).*1.*(::/activo::)" GROUP BY t0.pk
ORDER BY t2.title ASC
Seblod are hardcoding values that i haven´t selected.
LEFT JOIN `#__content` AS t2 ON t2.id = t0.pk ??!! i haven´t selected any content field...
t2.state = 1 AND t2.access IN (1,1) AND ( t2.publish_up = '0000-00-00 00:00:00' OR t2.publish_up <= '2014-03-26 09:33:53' ) AND ( t2.publish_down = '0000-00-00 00:00:00' OR t2.publish_down >= '2014-03-26 09:33:53' ) I don´t have these field´s, and t2 in query is #_content but i don´t use content table...