Hello I have the following sql in my results page of a form and it works fine.
if ($search_in == "Entire Database") {
$query = "SELECT * FROM add_info where Book_name LIKE '%$search_text%'
OR Book_ISBN LIKE '%$search_text%' ";
} else if ($search_in == "Book by Title"){
$query = "SELECT * FROM add_info where Book_name LIKE '%$search_text%'";
} else if ($search_in == "Book by Author") {
$query = "SELECT * FROM add_info where Book_author LIKE '%$search_text%'";
} else if ($search_in == "Book by ISBN") {
$query = "SELECT * FROM add_info where Book_ISBN LIKE '%$search_text%'";
}
Currently on the form page there are two criteria that the use can use a text box (search_text) and a drop down that has "Entire Database, Book by title, Book by Author, Book by ISBN and I need to add a drop down with all of the states(which I can figure out) however I am struggling adding it into my clause that I have posted above. If someone can help me out and guide me in the correct direction that would be very helpful.
Thanks-
Khris