';
return false;
}
$columns = 'art, runde, datum, charname, username';
$values = '\''.$title.'\','.$round.','.$date.',\''.$charname.'\',\''.$username.'\'';
if(is_numeric($charid)){
$columns .= ',charid';
$values .= ','.$charid;
}
if(is_numeric($userid)){
$columns .= ',userid';
$values .= ','.$userid;
}
$sql = 'INSERT INTO highscore('.$columns.') values('.$values.')';
// echo $sql.'
';
$qry = mysql_query($sql);
return mysql_affected_rows() > 0;
}
function getHallOfFameEntryCount($title, $userid) {
$row = mysql_fetch_assoc(mysql_query('Select max(id) as round from online'));
return getHallOfFameEntryCountFull($row['round'],$title, $userid);
}
function getHallOfFameEntryCountFull($round = '', $title = '', $userid = '') {
if(!is_numeric($round) && !is_numeric($userid)) {
return 0;
}
$sql = 'SELECT COUNT(*) FROM highscore WHERE art=\''.$title.'\' AND runde='.$round.' AND userid='.$userid;
// echo $sql .'
';
$row = mysql_fetch_row(mysql_query($sql));
return $row[0];
}
?>