Re: [PHP] Re: NULLS vs Empty result in PHP

2009-09-23 Thread Dan Shirah
> > 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. > > It's a CHAR (60) field. This

RE: [PHP] Re: NULLS vs Empty result in PHP

2009-09-23 Thread Ashley Sheridan
r both > managing your database and coding your program. > > > -Original Message- > From: Robert Cummings [mailto:rob...@interjinn.com] > Sent: Wednesday, September 23, 2009 4:28 PM > To: Ralph Deffke > Cc: php-general@lists.php.net > Subject: Re: [PHP] Re: NULL

RE: [PHP] Re: NULLS vs Empty result in PHP

2009-09-23 Thread Mert Oztekin
ge- From: Robert Cummings [mailto:rob...@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 ""

Re: [PHP] Re: NULLS vs Empty result in PHP

2009-09-23 Thread Robert Cummings
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 (htt

Re: [PHP] Re: NULLS vs Empty result in PHP

2009-09-23 Thread Dan Shirah
> > using empty() is ´the right way to check a var for NULL or "" > > however, it also depends what MySQL has got as setuo definition for empty > fields. on textfields u can define an epmty string as default. > > So say these are the first three results of my query: "some text" //The column actual