I need some help with this mysql query.
this is the query:
I keep getting this error:
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 '(dateSubmitted) BETWEEN '2005-12-01' AND '2005-12-05' ORDER BY
the 'dateSubmitted' field is an INT and has a unix timestamp that I made in my php script like this:
what am I doing wrong with this query? I am using mysql 4.1
this is the query:
| Code: |
| SELECT * FROM request_status AS s INNER JOIN requests AS req ON s.requestID = req.requestID INNER JOIN users AS usr ON req.usrEmail = usr.usrEmail WHERE status = 'pending' AND DATE(dateSubmitted) BETWEEN '2005-12-01' AND '2005-12-05' ORDER BY dateSubmitted |
I keep getting this error:
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 '(dateSubmitted) BETWEEN '2005-12-01' AND '2005-12-05' ORDER BY
the 'dateSubmitted' field is an INT and has a unix timestamp that I made in my php script like this:
| Code: |
|
$dateM=date("m",strtotime("now")); $dateD=date("d",strtotime("now")); $dateY=date("Y",strtotime("now")); $dateTS=mktime(0,0,0,$dateM,$dateD,$dateY); |
what am I doing wrong with this query? I am using mysql 4.1
