RE: [PHP-DB] OBDC date problems

From: Date: Wed, 11 Apr 2001 10:00:36 +0000
Subject: RE: [PHP-DB] OBDC date problems
Groups: php.db 
Request: Send a blank email to php-db+get-8472@lists.php.net to get a copy of this message
i think you need SELECT * FROM news WHERE fdate >= '$date' AND tdate >= '$date' the dates have to be single-quoted in your query string i generally use $query = "SELECT * FROM news WHERE fdate >= '".$date."' AND tdate >= '".date."'"; this may not be the best way and i would really appreciate it if someone could give me the 'correct' way. it's the way i used when i first started using php and have kinda kept it .... Steve > -----Original Message----- > From: Walter Franssen [mailto:w.franssen@nexwork.nl] > Sent: 11 April 2001 10:47 > To: php-db@lists.php.net > Subject: [PHP-DB] OBDC date problems > > > > Hello, i have some problems with date's in a query like > > SELECT * FROM news WHERE fdate >= $date AND tdate >= #date > > Can someone help me > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.db (#8472) next »