Re: date field is empty ?
| From: | Ignatius Reilly | Date: | Wed, 30 Apr 2003 21:31:50 +0000 |
| Subject: | Re: date field is empty ? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27455@lists.php.net to get a copy of this message | ||
No!!
NULL = NULL returns NULL
You must execute:
SELECT CUSTOMER WHERE bdate IS NULL
Ignatius
____________________________________________
----- Original Message -----
From: <Jeffrey_N_Dyke@Keane.com>
To: "buttoz" <buttoz@012.net.il>
Cc: <php-db@lists.php.net>
Sent: Wednesday, April 30, 2003 11:11 PM
Subject: Re: [PHP-DB] date field is empty ?
>
> you'll only get a match on that if you have defined the field specifically
> as a date field, and not a datetime field, which you may have done. did
you
> allow the field to be NULL? if so you'll have to check "SELECT CUSTOMER
> WHERE bdate = NULL";
>
> an empty datetime field would be "0000-00-00 00:00:00", unless you set
> empty values to be NULL.
>
> hth
> Jeff
>
>
>
> "buttoz"
> <buttoz@012.ne To: php-db@lists.php.net
> t.il> cc:
> Subject: [PHP-DB] date field
is empty ?
> 04/30/2003
> 03:51 PM
>
>
>
>
>
>
> hi,
> how can check in select command if bdate field is empty.
>
> i try SELECT CUSTOMER WHERE bdate='0000-00-00';
>
> that's not success .
> i am sure i have record without value in bdate field
>
>
> thanks
> zuhear
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>