【发布时间】:2015-05-27 15:26:26
【问题描述】:
这是有问题的代码:
$sql = "INSERT INTO club_territories (`club_id`, `teritorije_id`) VALUES ";
foreach ($params['territories'] as $key => $territory) {
$sql .= "('" . $clubId . "', '" . $territory . "')";
if ($key == end(array_keys($params['territories']))) {
$sql .= ';';
} else {
$sql .= ',';
}
}
return $query = mysql_query($sql, $this->link);
在第 4 行我有错误:严格标准:只有变量应该通过引用传递。这不是我的代码,我必须尽快修复它。有谁知道是什么问题?谢谢
【问题讨论】:
-
你做过研究吗?