I need multiple conditions in the where clause, I did this and it is not working. Any help appreciated.
$result5 = mysql_query("SELECT * FROM test WHERE (date BETWEEN '$sqlfrom' AND '$sqltoprevious') AND room_id = '$room_id' AND hotel_id = '$hotel_id'") or die (mysql_error());
while ($row5=mysql_fetch_array ($result5))
{
$dates = date('d M Y', strtotime($row5['date']));
$rate = $row5['rate'];
}
So, what I want is the dates and rates from the table test where the dates are between $sqlfrom and $sqltoprevious and where the room id is $room_id and hotel id is $hotel_id.