[SR-Users] About avp's, var's, null, 0 and empty string
Juha Heinanen
jh at tutpro.com
Wed Sep 15 17:12:44 CEST 2010
Iñaki Baz Castillo writes:
> 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?
inaki,
yes, it is.
have you tried what happens if you explicitly convert the rhs value to
(int)?
-- juha
More information about the sr-users
mailing list