Debugging: Error reading from database (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 'AND m.name = 'flashcard'
cm.instance = f.id AND
' at line 13
SELECT DISTINCT u.id
FROM phpu_user u
JOIN (
SELECT
fc.userid
FROM
phpu_course_modules cm,
phpu_modules m,
phpu_flashcard f,
phpu_flashcard_card fc
WHERE
cm.module = m.id AND
AND m.name = ?
cm.instance = f.id AND
f.id = fc.flashcardid AND
cm.id = ?
) target ON u.id = target.userid
Typo in SQL query - 'cm.module = m.id AND AND m.name = ?'
Should be: 'cm.module = m.id AND m.name = ? AND ...'
Debugging: Error reading from database (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 'AND m.name = 'flashcard' cm.instance = f.id AND ' at line 13
Typo in SQL query - 'cm.module = m.id AND AND m.name = ?'
Should be: 'cm.module = m.id AND m.name = ? AND ...'