I am having an issue with exp:query, after checking it on the pt site(http://help.pixelandtonic.com/brandonkelly/topics/can_i_conditionally_display_a_specific_cells_content). It seems as if this error is caused by the query module of EE
if i put this statement in a template, it returns an error
statement:
{embed='inc/.get_quote'
entry_ids='{exp:query sql="
SELECT md.entry_id FROM exp_matrix_data md
INNER JOIN exp_channel_titles ct ON ct.entry_id = md.entry_id
WHERE md.col_id_25 = "Strategy"
AND ct.channel_id = 6
"}'}error:
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
SELECT md.entry_id FROM exp_matrix_data md INNER JOIN exp_channel_titles ct ON ct.entry_id = md.entry_id WHERE md.col_id_25 =
Filename: modules/query/mod.query.php
Line Number: 181However, if i change the double quotes around Strategy into single quotes, there is no error, but no id’s are passed to the embedded template.
When i run the query in the sql manager, it does work, and returns a number of id’s