RE: [PHP] Re: NULLS vs Empty result in PHP
| From: | Mert Oztekin | Date: | Wed, 23 Sep 2009 13:34:37 +0000 |
| Subject: | RE: [PHP] Re: NULLS vs Empty result in PHP | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298275@lists.php.net to get a copy of this message | ||
if it can take only numeric values u can use is_numeric()
also i suggest that you not to use nulls in dbs. instead, use "not null" and "default
value" property. Its more simple and more effective for both managing your database and coding
your program.
-----Original Message-----
From: Robert Cummings [mailto:robert@interjinn.com]
Sent: Wednesday, September 23, 2009 4:28 PM
To: Ralph Deffke
Cc: php-general@lists.php.net
Subject: Re: [PHP] Re: NULLS vs Empty result in PHP
Ralph Deffke wrote:
> using empty() is ´the right way to check a var for NULL or ""
Empty will also match a string containing 0. And, to me, that doesn't at
all seem empty :)
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
________________________________
Bu mesaj ve ekleri, mesajda gönderildiği belirtilen kişi/kişilere özeldir ve gizlidir. Size
yanlışlıkla ulaşmışsa lütfen gönderen kisiyi bilgilendiriniz ve mesajı sisteminizden
siliniz. Mesaj ve eklerinin içeriği ile ilgili olarak şirketimizin herhangi bir hukuki
sorumluluğu bulunmamaktadır. Şirketimiz mesajın ve bilgilerinin size değişikliğe uğrayarak
veya geç ulaşmasından, bütünlüğünün ve gizliliğinin korunamamasından, virüs
içermesinden ve bilgisayar sisteminize verebileceği herhangi bir zarardan sorumlu tutulamaz.
This message and attachments are confidential and intended for the individual(s) stated in this
message. If you received this message in error, please immediately notify the sender and delete it
from your system. Our company has no legal responsibility for the contents of the message and its
attachments. Our company shall have no liability for any changes or late receiving, loss of
integrity and confidentiality, viruses and any damages caused in anyway to your computer system.