Thread: Error
View Single Post
  #5  
Old 01-16-2011, 08:59 PM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 47,445
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

Oi yes, there's the issue... x.x whoever installed this didn't take into the account that the prefix may be different from adopts_. Okay let's see if I can get this.

Replace:
PHP Code:
                  // Start Rewards
                  
                  // ************************************************  
                  
                  
                  //Get currency on level up
                  
                  
$query "SELECT * FROM `adopts_users` WHERE `username`='$loggedinname'";
                  
$result mysql_query($query);
                  
$num mysql_numrows($result);
                  
                  
$i 0;
                  while (
$i 1) {
                      
$dollar = @mysql_result($result$i"dollar");
                      
                      
// Change this number 10 to the number of currency you want users to earn on level up  
                      
$amount rand(515);
                      
$newbalance $dollar $amount;
                      
                      
$i++;
                  }
                  
                  
mysql_query("UPDATE `adopts_users` SET `dollar`='" $newbalance "' WHERE `username`='$loggedinname'"); 
WITH:

PHP Code:
                  // Start Rewards
                  
                  // ************************************************  
                  
                  
                  //Get currency on level up
                  
                  
$query "SELECT * FROM `".$prefix."users` WHERE `username`='$loggedinname'";
                  
$result mysql_query($query);
                  
$num mysql_numrows($result);
                  
                  
$i 0;
                  while (
$i 1) {
                      
$dollar = @mysql_result($result$i"dollar");
                      
                      
// Change this number 10 to the number of currency you want users to earn on level up  
                      
$amount rand(515);
                      
$newbalance $dollar $amount;
                      
                      
$i++;
                  }
                  
                  
mysql_query("UPDATE `".$prefix."users` SET `dollar`='" $newbalance "' WHERE `username`='$loggedinname'"); 
(EDIT: the above code IS fixed ^.^)

And I'm going to submit a bug report about this methinks...

Please let me know if that fixed it asap.

Last edited by Kaeliah; 01-16-2011 at 09:24 PM.
Reply With Quote