Millenium IT
12-16-2007, 06:31 PM
$user_f_rep = $vbulletin->db->query_read("SELECT COUNT(reputation.reputationid) AS reps, SUM(reputation.reputation) AS replevel, reputation.userid
FROM " . TABLE_PREFIX . "reputation AS reputation
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (reputation.userid = reputation.userid) WHERE reputation.userid = $vbulletin->userinfo['userid']
");
I keep getting database errors when I implement this plugin that im busy making. Its on forumhome_complete. any ideas? could you tell me where my flaw is?
--------------- Added 1197838558 at 1197838558 ---------------
Ok, I changed the codes a bit, got rid of the database error but now im getting a message where the variable is implemented in the template system reading"Recourse id #49"
this is the code im now using:
$user_f_rep = $vbulletin->db->query_read("
SELECT (reputation.reputation), reputation.userid
FROM " . TABLE_PREFIX . "reputation AS reputation
left join " . TABLE_PREFIX . "user AS user ON (reputation.userid = user.userid)
WHERE reputation.userid = {$vbulletin->userinfo['userid']}");
FROM " . TABLE_PREFIX . "reputation AS reputation
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (reputation.userid = reputation.userid) WHERE reputation.userid = $vbulletin->userinfo['userid']
");
I keep getting database errors when I implement this plugin that im busy making. Its on forumhome_complete. any ideas? could you tell me where my flaw is?
--------------- Added 1197838558 at 1197838558 ---------------
Ok, I changed the codes a bit, got rid of the database error but now im getting a message where the variable is implemented in the template system reading"Recourse id #49"
this is the code im now using:
$user_f_rep = $vbulletin->db->query_read("
SELECT (reputation.reputation), reputation.userid
FROM " . TABLE_PREFIX . "reputation AS reputation
left join " . TABLE_PREFIX . "user AS user ON (reputation.userid = user.userid)
WHERE reputation.userid = {$vbulletin->userinfo['userid']}");