CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 SELECT and date confusion

Print topic Send  topic

Author Message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.