ich hab das Buddylist Mod installiert und würde nun aber gerne direkt die Usernamen speichern anstatt nur eine Id (buddy_id)
Nun weiß ich nicht genau wie ich die sql query ändern muss.. wenn ich einfach nen nick (UserX) anstatt einer user_id eingebe passiert das:
Could not query buddylist information
DEBUG MODE
SQL Error : 1054 Unknown column 'UserX' in 'where clause'
SELECT * FROM phpbb_buddies WHERE user_id = 4 AND buddy_id = UserX
Line : 83
File : c:\apache\htdocs\phpbb2\includes\usercp_viewprofile.php
Wie kann ich die query so anpassen, das ich den usernamen speichern kann?
die original query ist:
Code: Alles auswählen
$sql = "INSERT INTO " . BUDDIES_TABLE . " VALUES (" . $userdata['user_id'] . "," . $buddy_id . ");";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not add the user to your buddylist', '', __LINE__, __FILE__, $sql);
}
buddy_id mediumint( 8 ) NOT NULL
Ich schätze mal die muss man dann auch als varchar machen...
Thx for your help
