Re: Getting my head around nulls
| From: | Ben dot Edwards at chase dot com | Date: | Wed, 26 Sep 2001 07:48:39 +0000 |
| Subject: | Re: Getting my head around nulls | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-68825@lists.php.net to get a copy of this message | ||
Steve Cayford <steve_cayford@unioncab.com> on 25/09/2001 17:28:57
To: Ben.Edwards@chase.com
cc: kjohnson@zootweb.com, php-general@lists.php.net
Subject: Re: [PHP] Getting my head around nulls
On Tuesday, September 25, 2001, at 10:30 AM, Ben.Edwards@chase.com
wrote:
>>
>> Just had a look at manual, ifnull() seems close to useless. However if
>> they had NVL(), as Oracle douse....
>>
>> NVL( column|litrel, '*null*' )
>>
>> This takes a column or literal as its first arg and if arg is null
>> returns
>> 2nd arg otherwise returns arg. In other words if the column is null it
>> is
>> replaces by arg2 otherwise it is simply returned.
>>
>
>Um, that's what ifnull() does. At least it works for me.
>
>-Steve
Verry true, sorry, was looking at nullif. Also noticed the if function,
can this have more than three parameters. i.e
if ( col, 'A', 'Accept', 'C', 'Complete',
'Unknown' )
like Oracle decode. and if elseif else structure.
Neb