$yourpricesearch is the name of the drop box with in the search form with the price values of 5.00, 10.00, 15.00 etc...i did it this way as i wasn't sure if when i put the AND in when the value of $yourpricesearch was empty would cause problems so im only putting the statement in if $yourpricesearch has a value
my prices of the books are in the format 10.15 for example
Expand|Select|Wrap|Line Numbers
- if(!$yourpricesearch==""){$yourprice=" AND yourprice < '$yourpricesearch'";}
- //Now we search for our search term, in the field the user specified
- $sql = "SELECT * FROM mytable_name WHERE status = 'active' AND isbn LIKE '%$isbnsearch%' AND title LIKE '%$keyword%' AND topic LIKE '%$topicsearch%' AND university LIKE '%$universitysearch%' $yourprice";
im not sure if something is wrong in the statement?
sorry forgot to say how it returns wrong results.....at the momwent there are book prices ranging from 2.00 to 19.00 ish.....when you search for less than 20.00...they all show.....less than 15.00 they all show.....less than 10.00....none show...yet there are some with 5.00.....2.00 etc?
thanks