Forum Moderators: coopster
I have the following code:
if ($stars){
$query = "SELECT * FROM hotels WHERE active=1 AND stars=$stars ORDER BY stars,priority DESC";
if (!$query) {
die ('invalid query');
}
if ($query){
$result = mysql_query ($query)
or die ("there are no entries");
while ($row = mysql_fetch_row ($result)) {
and then offcourse my output.
Now i want to select multiple values of stars. i have 1,2,3,4,5,6. if i want my page to display them all i thought i add the following:
if ($stars == "all") {
$stars = "1,2,3,4,5,6";
}
but i get no entries, how do i get this right in my code so he will display them all, but still displays one type when i send them the other values?
thx