Sorry to bother you again.
When I return to the calendar, shouldn't it be showing which dates are already selected? I see the dates selected in phpMyadmin, but they don't show up when the calendar loads or refreshes.
Thanks for all your help.
Pete
$sql="SELECT * FROM ".T_BOOKINGS." WHERE id_item=".$id." AND MONTH(the_date)=".$month." AND YEAR(the_date)=".$year."";
if(!$res=mysql_query($sql)) die("ERROR checking id item availability dates");
while($row=mysql_fetch_array($res)){
$booked_days[$row["the_date"]]=$row["state"];
}
echo "<br>".$sql="SELECT * FROM ".T_BOOKINGS." WHERE id_item=".$id." AND MONTH(the_date)=".$month." AND YEAR(the_date)=".$year."";
if(!$res=mysql_query($sql)) die("ERROR checking id item availability dates");
while($row=mysql_fetch_array($res)){
$booked_days[$row["the_date"]]=$row["state"];
}
echo "<br>".print_r($booked_days);
$booked_days=array();
$sql="SELECT * FROM ".T_BOOKINGS." WHERE id_item=".$id." AND MONTH(the_date)=".$month." AND YEAR(the_date)=".$year."";
if(!$res=mysql_query($sql)) die("ERROR checking id item availability dates");
while($row=mysql_fetch_array($res)){
$booked_days[$row["the_date"]]=$row["state"];
}
Users browsing this forum: No registered users and 1 guest