Re: [PHP-DB] Date SELECT with IF

2004-04-15 Thread Marcjon Louwersheimer
try the WHERE clause. SELECT name, address, phone, date FROM usertable WHERE date = '-00-00' And please, look at the mysql documentation, or at least the tutorial. -- Marcjon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Date SELECT with IF

2004-04-15 Thread Ignatius Reilly
lt;[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 15, 2004 7:44 PM Subject: [PHP-DB] Date SELECT with IF > Hi, > > Is it possible to have a clause in a mysql SELECT statement? I would the > query to display the date except where it equals the default 000-00-

[PHP-DB] Date SELECT with IF

2004-04-15 Thread Shaun
Hi, Is it possible to have a clause in a mysql SELECT statement? I would the query to display the date except where it equals the default 000-00-00 to display n/a or something similar. For example SELECT DATE_FORMAT(B.Booking_End_Date, \"%Y-%m-%d\") AS 'Booking End Date' FROM Bookings (IF Booking