|
You have an error in your SQL syntax near ') OR
STRCMP(t1.splastname, "")< 0
)
AND t2.topicid = 7
AND t1.s' at line 7SELECT t1.speakerid, t2.topicid
FROM speakers t1, speakertopics t2
WHERE t1.speakerid = t2.speakerid
AND (
(STRCMP(t1.splastname, "") = 0
AND t1.speakerid <
) OR
STRCMP(t1.splastname, "")< 0
)
AND t2.topicid = 7
AND t1.spactive = "T"
ORDER BY t1.splastname DESC, t1.speakerid DESC
LIMIT 1 |