I need help. I will say that I am not a php coder but I am forced to develop things on my own. I have a MySQL database of basketball drills with the following fields: category, title, description, number of players, keywords, and an image.
I want to search in probably 3 different ways:
1. Search by keyword. I have php code that successfully returns results when I put in a single keyword.
$search = mysql_real_escape_string(trim($_POST['searchterms']));
$query=mysql_query("SELECT * FROM Drills WHERE KEYWORDS LIKE '%$search%'");
but I can't return things if I type in more than keyword. should keywords be separated by commands in the database? I first did then took the commas out. So I need help if people type in more than one keyword.
2. I will also want people to be able to search by a category dropdown. Again, successful with that..
3. Will want people to be able to choose category + keyword + the number of players required (possible dropdown). So basically multiple search inputs to come up with drills for example that might involve ball-handling, passing and require 6 players....
I have done a lot of googling and pieced together code that does things in isolation but really need help with the overall effort. I can email or interact with people who can help me put together this effort.