RE: [PHP-DB] Comparing Two Values
| From: | Bastien Koert | Date: | Wed, 22 Dec 2004 02:06:41 +0000 |
| Subject: | RE: [PHP-DB] Comparing Two Values | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-37782@lists.php.net to get a copy of this message | ||
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@sympatico.ca> To: <php-db@lists.php.net> Subject: [PHP-DB] 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@sympatico.ca -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php