My search query ; not specific enough!
Posted: Thu Apr 09, 2009 12:21 pm
Greetings php technorati! Ok, my search query works but it will not return a specific entry. I used the AND with the variables and recieved no entries found. Even though there were entries that match my search criteria.
here is the code:
What do i need to do to get very specific user defined search results from the database?
thanks in advance,
Batoe
here is the code:
Code: Select all
$query = "SELECT * FROM js_profile WHERE category ='$category' AND years_exp = '$years_exp' AND
degree ='$degree' AND work_time ='$work_time' AND available ='$available' LIMIT 0, 2000 ";
$result = mysql_query($query) or die(mysql_error());Code: Select all
$query = "SELECT * FROM js_profile WHERE category ='$category' AND years_exp = '$years_exp' OR
degree ='$degree' OR work_time ='$work_time' OR available ='$available' LIMIT 0, 2000 ";
$result = mysql_query($query) or die(mysql_error());thanks in advance,
Batoe