I have a project using EE 1.6.7 where I’ve implemented use of some tables outside EE to store some user activity, and I’m using the Query module to fetch that stored data. Unfortunately, the query I’m using to test always returns no_results in the EE template, but when I run the exact same query in phpMyAdmin I get 2 rows. Here’s the EE code:
{exp:query sql="SELECT categoryGroup, COUNT(*) totalMetrics FROM quiz_answer_data WHERE quizID = '{segment_3}' AND userID = '{logged_in_member_id}' AND points > 0 GROUP BY categoryGroup ORDER BY categoryGroup ASC"}
{if no_results}
NO RESULTS
{/if}
{embed="assessment/.results-group" category_group="{categoryGroup}" total_metrics="{totalMetrics}"}
{/exp:query}In my testing, I have it outputting the sql line just before this code so I can c/p the exact SELECT into phpMyAdmin.
Maybe something in my sql is a reserved word in EE? Does anyone have any tips on debugging this? I don’t really have the option of upgrading EE to 1.6.8 right now, either, unless I know for sure it would resolve this issue.
Thanks so much for the assistance.