PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
SELECT * FROM vacancies WHERE title = '$jobtype' AND region = '$region'"
Now $jobtype can sometimes be a search by ALL so how can i wildcard it instead of editing the whole SQL. eg i know you could search for hello in a cell by using %hello% but how can i make it for anything.
if ($jobtype == "ALL") {
$query = "SELECT * FROM vacancies WHERE title LIKE '%' AND region = '$region'";
} else {
$query = "SELECT * FROM vacancies WHERE title = '$jobtype' AND region = '$region'";
}
you could actually remove the title LIKE '%' on the first SQL statement.