I am using mySQL
I have a table Merchant with a few SinUp
I need to list all the Merchant in a week or month or year
how do i make the query?
select * from Merchant where SinUp=week('gmdate("Y-m-d")')
this doesn't work
Submit any suggestion
try
SELECT * FROM Merchant WHERE week(Sinup) = week(NOW())
-Paul
Because it's taking 'gmdate("Y-m-d")' as a literal string.
Instead try taking out the single quotes or use the CONCAT function.