SELECT *
FROM claz
WHERE student AND (BETWEEN date AND date)
I have this one table claz
, and I need to search to find student records between date periods
SELECT *
FROM claz
WHERE student AND (BETWEEN date AND date)
I have this one table claz
, and I need to search to find student records between date periods
You may try to use it like this:
SELECT *
FROM claz
WHERE student = 'somevalue'
AND date_column BETWEEN '2013/02/25' AND '2013/02/27'
or like this:
SELECT *
FROM claz
WHERE student = 'somevalue'
AND date_column >'2013/02/25' AND date_column <'2013/02/27'
But it not very clear what you are trying to achieve
Try:
SELECT * FROM claz
WHERE student = ?
AND date BETWEEN date1 AND date2;
Not sure thought what your student should match and what name your date-column has. Couldn't test it, as I am not near my DB at the moment.
try this..
SELECT * FROM claz WHERE student = 'BG' AND date < maxdate AND date > mindate;
try this
SELECT *
FROM claz
WHERE student='name'
AND date BETWEEN 'date one' AND 'date two'