Link that i referred to -> MySQL - This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery
I have a teacher that has a code and a mac address attached to the router.. the students have to enter the same code from the same mac address.. i want a list of students who have done it ... and i want to only check the last code uploaded by the teacher
thank you for all the help :)
My code(which is working)->
SELECT s.s_id
FROM students s
WHERE s.mac IN
(SELECT *
FROM
(SELECT t.mac
FROM teacher t
ORDER BY t.sno DESC
LIMIT 1)temp_tab)
AND s.code IN
(SELECT *
FROM
(SELECT t.code
FROM teacher t
ORDER BY t.sno DESC
LIMIT 1)temp_tab);