Re: NULL values
| From: | Amit Tandon | Date: | Sat, 04 Dec 2010 11:40:01 +0000 |
| Subject: | Re: NULL values | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47522@lists.php.net to get a copy of this message | ||
Dear Ron
Or try this
SELECT * FROM
paypal_payment_info WHERE ifnull(os1, '') <>
'commission_paid'
============
regds
amit
"The difference between fiction and reality? Fiction has to make sense."
On Sat, Dec 4, 2010 at 7:55 AM, Ron Piggott
<ron.piggott@actsministries.org>wrote:
>
> When I do the following query in mySQL only 1 record is retrieved.
>
> SELECT * FROM paypal_payment_info WHERE
> os1 NOT LIKE 'commission_paid'
>
> I am surprised by this. This one record has no characters in it, but the
> “INSERT INTO” that created it used: ( os1 ) VALUES ( ‘’
> ) instead of: (
> os1 ) VALUES ( NULL ) . There are a number of records where
> os1 is
> NULL. I would like these rows to retrieve as well. How do I make a WHERE
> clause for a cell that is NULL ?
>
> Ron
>
> The Verse of the Day
> “Encouragement from God’s Word”
> http://www.TheVerseOfTheDay.info
>