Hey Guys,
Basically im trying to compare 2 cells. Im using datepicker and need to grey out dates that have been booked
Database rows are date and place
It works when I have one 'place' in the cell but when I have 2 or more it doesn't work.
Both cells have several dates and places
for example
date = '15/11/2012','16/11/2012' place = crow (that works but anymore places does not)
PHP Code:
$out = array();
foreach($_POST['place'] as $place){
$out[] = ("'".mysql_real_escape_string($place)."'");
}
$imploded = implode(', ', $out);
echo $imploded;
$date = "SELECT date FROM activities WHERE place IN ($imploded)";
echo $date;
$grey = mysql_query($date)or die(mysql_error());
?>
/* create an array of days which need to be disabled */
var disabledDays = [
<?php while ($row = mysql_fetch_array($grey, MYSQL_ASSOC)) {
echo '' .$row['date']. ',';
}
?>
Any ideas would be amazing


Reply With Quote
Bookmarks