PHP implicitly casts the variables to be the same here...in this case the
integer 2...if you want to force it to compare as text then you need to
ensure that both variables are cast as text
see here (http://ca3.php.net/language.types.type-juggling )
bastien
From: "Andre Matos" <andre.matos@xxxxxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
Subject: Comparing Two Values
Date: Tue, 21 Dec 2004 18:21:26 -0500
Hi List,
I was comparing two values, a current value with a new value to build the
UPDATE instruction and I faced this:
Current value: 2 == new value: 0002
So, PHP is telling me that the current is equal to the new. Is this
possible? Any idea to avoid this problem?
Thanks for any help.
Andre
--
Andre Matos
andre.matos@xxxxxxxxxxxx
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php