For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > September 2005 > Blank Date Field









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Blank Date Field
Joel

2005-09-12, 6:56 pm


Hi,

How do you determine if a Date field is blank. In my Sql statement I
only want records who's date field is blank (i.e. checking for only open
invoices where Date_Paid = '' ...still open ...it doesn't work when I use
that syntax)

The Db I'm using is Mysql.

Thank you



Hilarion

2005-09-12, 6:56 pm

> How do you determine if a Date field is blank. In my Sql statement I
> only want records who's date field is blank (i.e. checking for only open
> invoices where Date_Paid = '' ...still open ...it doesn't work when I use
> that syntax)



SELECT some_column, another_column
FROM some_table
WHERE date_field IS NULL
ORDER BY some_column, another_column


Hilarion
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com