RE: [PHP-DB] Comparing Two Values

From: Date: Wed, 22 Dec 2004 19:08:47 +0000
Subject: RE: [PHP-DB] Comparing Two Values
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-37799@lists.php.net to get a copy of this message
It is working now using === or !== Thanks a lot. Andre -- Andre Matos andre.matos@sympatico.ca -----Original Message----- From: tg-php@gryffyndevelopment.com [mailto:tg-php@gryffyndevelopment.com] Sent: Tuesday, December 21, 2004 8:10 PM To: php-db@lists.php.net Cc: andre.matos@sympatico.ca Subject: Re: [PHP-DB] Comparing Two Values To be honest, I havn't had much use for it myself but I've done a lot of 'hack' projects that didn't need to be this specific. But as I understand, you might want to use the triple-equal sign to determine if they're exactly the same. Are you comparing... 2 with... "0002" (integer versus a string?) If so, the === should work I believe. It should compare variable types as well as values so it shouldn't convert "0002" to just 2 before doing the evaluation. Good luck! -TG = = = Original message = = = 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 ___________________________________________________________ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com.

« previous php.db (#37799) next »