I have a session variable with what I want to extract data. Will this way of stating the query work to compare and extract only where the staff No is = to variable?
SELECT users.StaffNo, timedata.LogonTime, users.NSurname
FROM users, timedata
WHERE users.StaffNo = '$SESSION_UID'
ORDER BY timedata.LogonTime
SELECT users.StaffNo, timedata.LogonTime, users.NSurname
FROM users, timedata
WHERE users.StaffNo = '$SESSION_UID'
ORDER BY timedata.LogonTime