[dev] [cvs] commit: turba/lib/Driver sql.php

Jan Schneider jan at horde.org
Tue Oct 30 10:27:07 UTC 2007


Zitat von Matt Selsky <selsky at columbia.edu>:

> SELECT object_id, object_type, owner_id, object_name, object_bday
> FROM turba_objects
> WHERE (owner_id = ? AND object_bday \!= ?)
> 	AND object_bday IS NOT NULL
> 	AND SUBSTR(object_bday, 6, 5) BETWEEN ? AND ?
>
> Also, why do we need to check for object_bday != '' and object_bday
> IS NOT NULL?  The IS NOT NULL check should be sufficient.

Not necessarily. It could well happen that the birthday row is an  
empty string, e.g. when resetting the birthday, importing contacts  
etc. It's just a safeguard.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list