RE: PHP problem


Subject: RE: PHP problem
From: Mike Barsalou (mbarsalou@aidea.org)
Date: Thu Oct 10 2002 - 14:22:31 AKDT


So since they are char(200 and varchar(200) respectively I can use the
string operator even though they may have numbers that I want to
compare...correct? It would just treat them as ascii text, right?

Mike

-----Original Message-----
From: Leif Sawyer [mailto:lsawyer@gci.com]
Sent: Thursday, October 10, 2002 1:57 PM
To: Mike Barsalou; 'aklug@aklug.org'
Subject: RE: PHP problem

Mike Barsalou writes:
> if ($output == $value)
> [...]
>
> Produces this:
>
> Output:217: Value:217:
> The values are not equal

Make sure that you're comparing integer to integer, and not
string to integer..

        if ( (string)$output == (string)$value )
or
        if ( (int)$output == (int)$value )

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Thu Oct 10 2002 - 14:24:21 AKDT