Hi group,

I am still getting to grips with PHP and MySQL and have a question that hopefully 
someone can easily answer:

I have a search page which consists of two drop down menus, the user has 3 ways of 
finding information.

The first is by selecting a location and a discipline which would look in the database 
and return any entries with the data in the two seperate fields.

The second is where they can select the location only, and this will return all 
entries with that location

The third is where they can select the discipline only, and again this will return all 
entries with that discipline.

The problem I have is when the user selects the location and a discipline which should 
return no results as it is not an exact match it is returning results as it contains 
part of the information.

My sql query is as follows: $sql = "SELECT * FROM vacancy WHERE ('$related_discipline' 
= related_discipline and '$location' = location) or ('$related_discipline' = 
related_discipline) or ('$location' = location) ORDER BY ID LIMIT $limitvalue1, 
$limit"; 

Could someone tell me what I need to change?

Again help is always appreciated.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to