Thread: A modification
View Single Post
  #6  
Old 11-07-2011, 11:58 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 392,419
Hall of Famer is on a distinguished road
Default

Well I would do the following changes:

PHP Code:
if($owned_adoptable['isfrozen'] == "no"){
        
$result runquery("SELECT * FROM {$prefix}users WHERE username='{$owned_adoptable['owner']}'");
        
$user mysql_fetch_array($result);
        
$reward clickreward(grabanysetting('rewardmoney'), $owned_adoptable['owner'], $user['money']);     
        
$newamount $user['money'] + $reward;    
        
runquery("UPDATE {$GLOBALS['prefix']}users SET `money` = '{$newamount}' WHERE `username` = '{$owned_adoptable['owner']}'"); 
As you can see, the program looks a bit confusing 'cause the adoptable owner's money data cannot be easily retrieved from database. The mysql SELECT query has to be executed and mysql_fetch_array needs to be manipulated. Also the $article_content line is removed for a good reason. Try this on your site and lemme know if it works.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote