| 
 Posted by Rik on 01/12/07 08:59 
ZMAN wrote: 
> Hello All- 
> 
> I need to extract a result from a postgres database and PHP. 
> I need to get everything greater than today's date. 
> I'm comparing it against a timestamp field that can have something 
> like '2006-12-30 05:47:35.089-05' or NULL. 
> Basically: 
> SELECT * from table_name 
> WHERE timestamp_field is >= today 
> 
> I want the NULL values in the result set as well... 
> 
 
Euhm, not sure about postgres, in MySQL this works: 
WHERE timestamp_field >= NOW() OR timestamp_field IS NULL 
--  
Rik Wasmus
 
  
Navigation:
[Reply to this message] 
 |