Hi, I have a directory of professional magicians, consisting of a MySQL table like this:
+-------------+------------+-------------+ | artist | area | magic | +-------------+------------+-------------+ | Joe Bloggs | AZ*IN*TX | childrens | +-------------+------------+-------------+ | Fred Smith | All | close-up | +-------------+------------+-------------+ A surfer will select an area and then the type of magic they require via a php/HTML form. So to locate a performer who does magic for children in Texas I use SELECT * FROM artist WHERE (area LIKE '%$area%' OR area = 'All') AND magic LIKE '%$magic%' (where $area and $magic are variables passed from PHP). However, this does not give the desired result, it just returns any perfomer who does magic for children. What am I doing wrong please? I've tried several other syntax combinations without success. kind regards, Graham Nichols. --------------------------------------------------------------------- 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