我有一张桌子events
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`data` date DEFAULT NULL,
`days` int(2) DEFAULT NULL,
PRIMARY KEY (`id`)
与许多记录。
我生成一个包含所有不可用日期的数组
$sql = "SELECT * FROM events WHERE `data` LIKE '".$cYear."-".$cMonth."-%'";
$sql_result = mysql_query ($sql, $connection ) or die ('request "Could not execute SQL query" '.$sql);
while ($row = mysql_fetch_assoc($sql_result)) {
$unavailable[] = $row["data"];
$days[] = $row["days"];
}
数组 $unavailable 是这样的: (2012-08-10, 2012-08-25) 数组 $days 是这样的: (3, 2)
我需要这样的数组: (2012-08-10, 2012-08-11, 2012-08-12, 2012-08-25, 2012-08-26)
谢谢!