This is the problematic code:
$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);
On line 4 I have error: Strict standards: Only variables should be passed by reference. This is not my code, and I have to fix it asap. Do anyone know what is the problem ? Thanks