Graham,
Monday, May 13, 2002, 8:45:09 PM, you wrote:

GN> I have a directory of professional magicians, consisting of  a MySQL table
GN> like
GN> this:

GN> +-------------+------------+-------------+
GN>  | artist             | area            | magic           |
GN> +-------------+------------+-------------+
GN>  | Joe Bloggs   | AZ*IN*TX | childrens      |
GN> +-------------+------------+-------------+
GN>  | Fred Smith   | All              | close-up       |
GN> +-------------+------------+-------------+

GN>  A surfer will select an area and then the type of magic they require via a
GN> php/HTML form. So to locate a performer who does magic for children in Texas
GN> I use

GN> SELECT * FROM artist WHERE (area LIKE '%$area%' OR area = 'All') AND magic
GN> LIKE '%$magic%'

GN> (where $area and $magic are variables passed from PHP).

GN> However, this does not give the desired result, it just returns any perfomer
GN> who does magic for children. What am I doing wrong please? I've tried
GN> several other syntax combinations without success.

What are the values of your php variables? Are you sure that they are
correct?

GN> kind regards,
GN> Graham Nichols.




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
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

Reply via email to