[asterisk-dev] NULL from MySQL database not NULL?

Chris Maciejewski chris at wima.co.uk
Thu May 7 00:21:13 CDT 2009


I understand ISNULL function has no relation to a database.
And ISNULL function is working perfectly fine.

There is a problem with MYSQL( fetch.... ) which converts NULL into "NULL".
I opened a bug 15045 and submitted a patch to fix this.

Regards,
Chris


2009/5/6 Tilghman Lesher <tilghman at mail.jeffandtilghman.com>:
> On Wednesday 06 May 2009 14:52:44 Chris Maciejewski wrote:
>> I would argue with this because my "null" value in the database is not
>> a literal "null" string, but the actual null value. It is a result of
>> the following query: "UPDATE table SET some_null_col = NULL WHERE id =
>> 1"
>>
>> So the actual value of some_null_col is NULL and not "NULL" and once
>> such a value is assigned to a channel variable, that variable is NULL,
>> therefore ISNULL function should return 1.
>
> Again, the ISNULL function has no relation whatsoever to your database.
>
> --
> Tilghman
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>



More information about the asterisk-dev mailing list