while ($row = mysql_fetch_array($sqlquery))
{
$fd = strtotime($row['date1']);
$sd = strtotime($row['date2']);
$dates = floor(($sd - $fd)/86400);
$price = $dates * 25;
}
我想插入另一个表$price
为每一行。我无法使用单个插入来执行此操作,因为$price
每次都不相同。向MySQL插入一个变量,每个行都变化
有什么错误?可能你可以将$价格保存在一个数组中 – jcho360 2013-04-25 16:42:39
$ price只是从行date1和date2的计算 – marina 2013-04-25 16:44:31