y'know it helps when I pay attention and put in the right variable names and stuff. 😉
But yay! it works!
I did fiddle with it a bit cuz I'm not sure about the whole IS NOT NULL thing. I don't really understand the whole NULL/NOT NULL thing as pertains to databases.
So here's what I ended up with:
if($_GET['select_race']) {
$rQuery = "race = '".$_GET['select_race']."'";
}
if($_GET['select_class']) {
if ($rQuery){
$cQuery = " AND class='".$_GET['select_class']."'";
} else {
$cQuery = "class = '".$_GET['select_class']."'";
}
}
$query = "SELECT * FROM $table_name WHERE (".$rQuery.$cQuery.") ORDER BY first_name";
I'll change the GET back to POST when it goes live, but I wanted to see what was being passed along during testing.
If I made some part of it needlessly complicated then I apologize. I'm afraid I know just enough to be dangerous with this stuff.
Thanks very much LordShryku!