PeterE
|
| Posted: 12/09/2004, 8:52 AM |
|
Why does this work:
SELECT title,date1 FROM artikelen WHERE date1< now()
and this does not:
SELECT title,date1 FROM artikelen WHERE date1< date("Y-m-d", mktime(0, 0, 0, date("Y"), date("m")-1, date("d"))
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 12/09/2004, 10:50 AM |
|
Looks like your database supports the "now" function, but doesn't support "date" or "mktime" functions. You may need to check your database documentation to create correct SQL syntax.
If you're using MySQL then refer to http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
|