Hello, I am trying to make a search that a user can filter. What I am going to show you is fully functional, but i cant figure out how to further a piece of it.
Ok, this is for a game. If you have ever played games before, you will sometimes see you can choose a Race, or a Class.
Well, in this game, you can choose 16 races, and 5 classes.
The value for both select boxes is a single number.
The item they search has *multiple* races, and classes, this is where i am confused.
I made the item_table like this:
ID : itemname : classlist : racelist
Each list looks like this: 5 3 2 10 3 4 5 6 7 1 1 etc
Now the SQL im using:
This will work for single digit numbers.
$SQL = "SELECT * FROM itemsearch WHERE itemname LIKE '%$user_input%' AND classlist = '$classes' AND racelist = '$races'";
But how can i have the SQL search the list for the $classes $races input?
Thanks