RE: [PHP] Query with date

From: Date: Sat, 26 Apr 2003 19:47:12 +0000
Subject: RE: [PHP] Query with date
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145375@lists.php.net to get a copy of this message
> I need all news befor the 27th of April. What is wrong with the code > below? > > Quote: > > $sql="SELECT * From News where NewsDate<(2003-04-27) order by NewsDate > desc "; 2003-04-27 is a string and should be enclosed in quotes. Lose the parenthesis around it, too. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#145375) next »