Re: Help?
| From: | Paul K Egell-Johnsen | Date: | Fri, 10 Nov 2000 12:44:37 +0000 |
| Subject: | Re: Help? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24650@lists.php.net to get a copy of this message | ||
Wee Chua wrote:
>
> Hi all,
> Once I have the fullname field from the query, is it possible I could do the
> string comparison, thanks a lot.
>
> such as,
>
> $result=mysql_query("SELECT concat(fname,' ',lname) fullname, ... FROM
> tablename",$db);
>
> $data=mysql_fetch_row($result);
> $data=$row('fullname');
>
> if ($data!==$old)
> { echo "yes";
> } else { echo "no"; }
>
A litle error "$data!==$old" is incorrect, you need to use
"$data!=$old"! Note the use of only one = sign in the comparision. The
rest of the code seems ok.
--
Paul K Egell-Johnsen
Developer/PR Manager
eZ systems as
http://zez.org - about: code