The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Whats wrong with this SQL code?
Code:
$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'] "); --------------- Added [DATE]1197838558[/DATE] at [TIME]1197838558[/TIME] --------------- 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: Code:
$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']}"); |
#2
|
|||
|
|||
If you are just selecting the first result try this:
PHP Code:
|
#3
|
|||
|
|||
Thanks Opserty, Im amazed to see someone actually replied. I created a cleaner code and created a 'while' function while i was waiting for help, and it worked But thanks anyway
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|