using the following in your url path
: is used to break up each value you want to search by, using the explode function in the php code, this then takes your values and puts them in an array, using a loop and an if statement we then build up your custom query which we then us on the DB
<?
// splits into array.
$searchfor = explode(":",$var);
// Builds your OR statment
for ($n = 0; $n < count($searchfor); $n++) {
//stops a false OR at the end of your custom query
if ($n != (count($searchfor) - 1)) {
$custom_query = $custom_query . "id='" . $searchfor[$n] . "'" . " OR ";
} else {
$custom_query = $custom_query . "id='" . $searchfor[$n] . "'";
}
}
// Debug, so you can see your custom query
echo "SELECT * FROM pageconfig WHERE " . $custom_query ;
$result = mysql_query("SELECT * FROM pageconfig WHERE " . $custom_query,$db);
while ($row = mysql_fetch_array ($result)) {
echo $row['id'];
}
?>