[SR-Users] About avp's, var's, null, 0 and empty string

Iñaki Baz Castillo ibc at aliax.net
Wed Sep 15 16:44:02 CEST 2010


2010/9/15 Iñaki Baz Castillo <ibc at aliax.net>:
> Conclusions:
>
> - $var cannot store null value. If so it converts it to 0.

However this is not the case with sqlops module:

I retrieve the value of an integer column in a MySQL table. In this
case the value is NULL. I store the result in a $var:

 $var(client_max_calls) = $dbr(client=>[0,0]);

But the stored value is "" (empty string) rather than 0. Isn't a bit confussing?


-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-users mailing list