Hello,
I need some help, I'm using a select field with sql query, but my website is multilang, and when I change the language of my site, I need get the article in EN for example:
Normal version:
Code:
"SELECT id, title AS value,title from #__flexicontent_items_tmp where catid=25 GROUP BY title
So, in falang I try someting like:
Code:
SELECT id, title AS value,title from #__flexicontent_items_tmp where catid=25 and [b][i]language='en-GB'[/i][/b] GROUP BY title
In php my admin, that works, but in my select dont, and return me only 2 items, in pt..
EDIT: I try something like:
Code:
SELECT i.id, i.title, i.catid, i.state, i.language AS value,title FROM #__content AS i LEFT JOIN #__flexicontent_items_ext AS ie on i.id=ie.item_id JOIN #__flexicontent_cats_item_relations AS rel on i.id=rel.itemid WHERE rel.catid IN (25) AND (ie.language='en-GB' OR ie.language='*') AND i.state IN (1, -5) GROUP BY rel.itemid ORDER BY i.title ASC
And dont work.. on select field, on phpmyadmin, work perfectly!
FINAL: What's wrong? Simple, you need associate the EN items (CATID 25) to the other articles on CAT 26 to show on filter, so:
Code:
SELECT id, title AS value,title FROM #__content where catid=25
WORK!
Any idea?