DB_DataObject Bug in a select
| From: | foxmask | Date: | Sun, 27 Mar 2005 23:30:26 +0000 |
| Subject: | DB_DataObject Bug in a select | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18368@lists.php.net to get a copy of this message | ||
I use mysql and would like to make a query that find the birthday of
the member of my forum so i did
$births = new DAO_Spb_user;
$births->selectAs(array('user_id','user_nick'));
$births->whereAdd("MONTH(user_birthday)","3");
$births->whereAdd("DAY(user_birthday)","27");
but this find nothing
so i tried
$births->query("select user_id,user_nick FROM user where
MONTH(user_birthday) = '".date("m")."' AND DAY(user_birthday) =
'".date("d")."'");
which find the data i searched.
the question is , is it a bug ?
or do i have to find another way to query the database in a more
generic way to be able to make this search working on most of RDBMS ?
regards.
--
Founder Member of PhpFr.Org a PHP Portal for French Community
http://phpfr.org