Alguien me puede ayudar a traducir la sentencia….
Me marca este error:
( ! ) Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting T_VARIABLE or '$' in C:\wamp\www\compras\modules\system\admin\users\use rs.php on line 263
case 'user':
$tables = array("comments","xoopspollcomments");
$total_posts = 0;
$sql = "SELECT COUNT(*) AS total FROM ".$->prefix("bb_posts")." WHERE uid=$id";
if ($result = $db->query($sql)) {
if($row = $db->fetch_array($result)) {
$total_posts = $total_posts + $row['total'];
}
}
foreach ($tables as $table) {
$sql = "SELECT COUNT(*) AS total FROM ".$db->prefix($table)." WHERE user_id=$id";
if ( $result = $db->query($sql) ) {
if ($row = $db->fetch_array($result)) {
$total_posts = $total_posts + $row['total'];
}
}
}
$sql = "UPDATE ".RC_USERS_TBL." SET posts=$total_posts WHERE uid=$id";
if (!$result = $db->query($sql)) {
die(sprintf(_AM_CNUUSER %s ,$id));
}
break;
Gracias!!!!