Hallo,
Ich habe folgendes Problem und zwar habe ich den "Visitor-Hack by speedy" eingebaut eigendlich eine schnelle sache aber leider habe ich immer eine fehler Meldung die ich nicht ganz verstehe.
Wenn ich auf einen User klicke bekomme ich diese Meldung:
Zitat: SQL-DATABASE ERROR
Database error in WoltLab Burning Board (2.3.5): Invalid SQL: Delete from bb1_profilevisits where profile_id=1 and art='V' and datum<
mysql error: 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
mysql error number: 1064
mysql version: 4.1.13
php version: 4.4.0
Date: 22.09.2006 @ 20:13
Script: /wbb2/profile.php?userid=1&sid=
Referer: http://date-nrw.net/wbb2/index.php
So weit so gut das komische ist wenn ich in der Profil.php dieses wieder raus nehme ist der fehler weg.
Zitat:
/* Visitor-Hack by speedy */
$datei = "bb" . $n . "_profilevisits" ;
/* Nicht zu berücksichtigende User-IDs; array( 2,6,12) */
$idexclude = array();
if ( ( $userid != $wbbuserdata['userid'] ) and ( !in_array($wbbuserdata['userid'], $idexclude ) ) ) {
$db->query("INSERT INTO $datei set profile_id=$userid,visitor_id=" . $wbbuserdata['userid'] . ",art='V'") ;
$result = $db->query_first("Select visitor_id from $datei where profile_id=$userid and art='C'");
if (!$result) {
$db->query("Insert into $datei set profile_id=$userid,visitor_id=1,art='C'") ;
} else {
$counter = $result[0] + 1 ;
$db->query("Update $datei set visitor_id=$counter where profile_id=$userid and art='C'") ; }
}
$result = $db->query_first("Select visitor_id from $datei where profile_id=$userid and art='C'");
$visitorcounter = $result[0] ;
$abfrage = "SELECT v.profile_id, v.visitor_id, v.art, v.datum, date_format(v.datum,'%d.%m.%Y %H:%i'), u.username FROM $datei v LEFT JOIN bb" . $n . "_users u ON (u.userid=v.visitor_id) WHERE v.profile_id=$userid AND v.art='V' ".(($display_guests==0) ? ("AND v.visitor_id>0 ") : (""))."ORDER BY v.datum desc LIMIT 0,$limit" ;
$result=$db->query($abfrage);
while ($row = $db->fetch_array($result)) {
$visitor = $row[1];
$ldate = $row[3];
$datum = $row[4];
$name = $row[5];
if ($name=="") { $name="Besucher" ; }
$output .= "<tr><td><span class='normalfont'>".$name."</span></td>" ;
$output .= "<td><span class='normalfont'>".$datum."</span></td></tr>" ;
}
$output .= "</table>" ;
$db->query("Delete from $datei where profile_id=$userid and art='V' and datum<$ldate") ;
/* Visitor-Hack by speedy */
Würde dieses aber gerne nutzen und hoffe das mir einer helfen kann ach ja es ist ein Wbb 2.3.5 Board