habe einen USer Bewertungs hack eingebaut. Will man einem User �ber das UserProfil eine Bewertung abgeben und klickt auf den SubMit Button kommt folgender SQL Fehler:
-----------------
Could not insert rating informations
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
INSERT INTO phpbb_rate_users (rate_id,rated_id,rater_id,rate) VALUES (1,1126,9,)
Line : 1162
File : functions.php
---------------------
Zeile 1162 liegt innerhalb der FUnktion dees Hacks, die man bei der Installation in der functions.php einfach am Ende der Datei einf�gt. ( Zeile 1162 ist die rote)
------------------------------------------------
function rate_user($userdata, $profiledata, $rate)
{
global $db, $userdata, $profiledata, $phpEx, $phpbb_root_path;
$sql = "SELECT MAX(rate_id) AS total
FROM " . RATE_USERS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain next rate_id information', '', __LINE__, __FILE__, $sql);
}
if ( !($row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_ERROR, 'Could not obtain next rate_id information', '', __LINE__, __FILE__, $sql);
}
$rate_id = $row['total'] + 1;
$sql = "INSERT INTO " . RATE_USERS_TABLE ." (rate_id,rated_id,rater_id,rate) VALUES (".$rate_id.",".$profiledata['user_id'].",".$userdata['user_id'].",$rate) ";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert rating informations', '', __LINE__, __FILE__, $sql);
}
$sql = "SELECT rate FROM " . RATE_USERS_TABLE ."
WHERE rated_id = ".$profiledata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert rating informations', '', __LINE__, __FILE__, $sql);
}
$raterow = $db->sql_fetchrowset($result);
$total_rate = 0;
for($i = 0; $i < count($raterow); $i++)
{
$total_rate = $total_rate + $raterow[$i]['rate'];
}
$new_average = round(( $total_rate / count($raterow))*100);
$sql = "UPDATE " . USERS_TABLE ."
SET user_average_rate = ".$new_average."
WHERE user_id = ".$profiledata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert rating informations', '', __LINE__, __FILE__, $sql);
}
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=".$profiledata['user_id']."");
redirect($temp_url);
}
?>
------------------------------------------------
Kann sich des mal jemand ansehen ?

Besten Dank