Code: Select all
$sql = mysql_query("SELECT * FROM calendar_events WHERE event_date = '$year-$month-$day'");
if (mysql_num_rows($sql) > 0) {
while ($e = mysql_fetch_array($sql)) {
echo "<p>$e[event_avalibility]</p>\n";
}
} else {
echo "<p>No events today</p>\n";
}and a field in the table called listing_id
i want to add a extra criteria to the above query that says
SELECT * FROM calendar_events WHERE event_date = '$year-$month-$day
and
where listing_id = $listingid
so basicly i want all event dates where listing_id = $listingid
im just not sure how to write it in. any help would be appricated