In the last episode (Jan 27), phill@stripped said:
> >Description:
> The use of three = clauses in a SELECT seems to return bogus results.
> >How-To-Repeat:
> mysql> SELECT profiles.percent, adverts.image,
> adverts.advert_id, profile.profile_id FROM profiles, profile,
> adverts WHERE (profile.profile_id = profiles.profile_id =
> profiles.profile_id = 1);
You need to replace one of your '='s with an AND:
SELECT profiles.percent, adverts.image, adverts.advert_id,
profile.profile_id FROM profiles, profile, adverts WHERE
(profile.profile_id = profiles.profile_id AND profiles.profile_id = 1);
I don't know any language that parses "a = b = c" as a triple-equality
compare.
--
Dan Nelson
dnelson@stripped