I am trying to search for studentID within a date range.
I only have one date in my database, therfore i only want the users to input one date, rather than having them input a start date and an end date for:
WHERE timeStamp BETWEEN startDate AND endDate
So i am trying this...
SELECT * FROM scansTable
INNER JOIN registeredUsers ON scansTable.studentID = registeredUsers.id
INNER JOIN labSession ON scansTable.labSessionID = labSession.id
INNER JOIN staffTable ON labSession.lecturer = staffTable.id
INNER JOIN unitTable ON labSession.unit = unitTable.id
WHERE studentID = '10'
AND labSession.StartTimeStamp BETWEEN '2011 -05 -30'+00:00:00
AND '2011 -05 -30'+23:59:59;
But it is not returning anything when i know for sure there is a student of id 10 and that date range in the database
Am i doing the +00:00:00 wrong??
thanks