Wiliam Stephens writes:
> My two columns are set up as follows:
> res_places SET('North','West','South')
> res_places_re SET('Aber','Cardiff','Bangor')
>
> And I'm currently using the following MySQL query:
> SELECT * FROM gd_records WHERE (res_places & 3)
> AND (res_places_re & 1);
>
> Which turns out very strange resutls.
I saw you post this a while back, and at first I couldn't see anything
wrong, but then I realized that you probably don't want to match 3
out of 4 values for the first set and every other for the second.
That is, you're doing a bitwise AND (&), when what you want is probably
just a plain equality (=).
//C
--
Carl Troein - C�rdan / Istari-PixelMagic - UIN 16353280
[EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
Amiga user since '89, and damned proud of it too.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php