I am getting the following error:
#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 'LIMIT 0, 25' at line 1
when using this code:
SELECT * FROM `mytablename`
RIGHT JOIN (
SELECT wdt_ID, TIMEDIFF (NOW(),mytablename.`Time_stamp`) AS Wait
FROM `mytablename`
) as t
The error is the same when I use a LEFT JOIN
, RIGHT JOIN
, or FULL OUTER JOIN
but I don't get the error when I use a JOIN
only statement. That takes what are only 8 results and repeats them over and over for 200 results that are the same. Where am I going wrong?