Hi,
I know the problem that I am having is related to the change in PHP5 about strings and arrays, however I do not understand why my script is affected. It seems like I am not trying to add more variables to an array. I do not success in order solve the problem.
Help me please:
// increment view counter for either the single blog being shown
// or ALL blogs being shown
if ($view_rows[1]["nIdCode"]!="" && strpos($_SERVER["PHP_SELF"],"admin.php")==false){
if ($viewmode=="single"){
$blogid = $view_rows[1]["nIdCode"];
$sql = "UPDATE blog SET nViews=nViews+1 WHERE nIdCode=".$blogid;
} else {
for ($i=1;$i<=count($view_rows);$i++){
$blog_array[$i] = $view_rows[$i]["nIdCode"];
}
$blogids = implode(",",$blog_array);
$sql = "UPDATE blog SET nViews=nViews+1 WHERE nIdCode IN (".$blogids.")";
}
$result = mysql_query($sql,$con);
if ($result==false){
print "<li>Problem with SQL<br>[".$sql."]</li>\n";
}
}
}