Seite 1 von 1
knwoledge DB bringt bei Artikel löschen Fehler
Verfasst: 08.04.2005 08:15
von RalfThomas
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 3
SELECT MAX(post_id) AS last_post, COUNT(post_id) AS total FROM phpbb_posts WHERE forum_id =
Line : 99
File : /srv/www/htdocs/web16/html/phpBB2/includes/functions_admin.php
Verfasst: 08.04.2005 12:26
von Markus67
Hi ..
verlinke mal die includes/functions_admin.php als txt-Datei
KB:datei
Markus
die datei
Verfasst: 08.04.2005 12:47
von RalfThomas
//
// Get Userdata, $user can be username or user_id. If force_str is true, the username will be forced.
//
function get_userdata($user, $force_str = false)
{
global $db;
if (intval($user) == 0 || $force_str)
{
$user = trim(htmlspecialchars($user));
$user = substr(str_replace("\\'", "'", $user), 0, 25);
$user = str_replace("'", "\\'", $user);
}
else
{
$user = intval($user);
}
$sql = "SELECT *
FROM " . USERS_TABLE . "
WHERE ";
$sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" . $user . "'" ) . " AND user_id <> " . ANONYMOUS;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql);
}
return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
}
Bitte beim nächstenmal die Datei verlinken
KB:datei
Markus67