I need to check for value range multiple times, this is how i do it till now:
<?php
$preischeck = mysql_query("SELECT preis FROM outfits WHERE aktiv = 'ja' and preis <= 100 $marke $farbe");
if(mysql_num_rows($preischeck) > 0) {
echo "0 - 100 is there";
}
?>
<?php
$preischeck = mysql_query("SELECT preis FROM outfits WHERE aktiv = 'ja' and preis > 100 and preis <= 200 $marke $farbe");
if(mysql_num_rows($preischeck) > 0) {
echo "100 - 200 is there";
}
?>
And so on.. I guess this is too much for the server and there is a better way. Any ideas?