View Single Post
  #1  
Old 12-23-2016, 10:10 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,430
Dinocanid is on a distinguished road
Default Can't update user status

I have new columns in my users_status table for user achievements, but I can't seem to update them. I see lines like these in user.php that works for the others:
PHP Code:
$mysidia->db->update("users_status", array("canvm" => 'no'), "uid='{$mysidia->input->get("uid")}'"); 
One of my achievements unlocks when a user has owned a certain number of pets, which I used these lines of code in myadoptsview for:
PHP Code:
$shelfSpace $mysidia->db->select("users", array("shelfspace"), "username = '{$mysidia->user->username}'")->fetchColumn(); 
$adoptAmount $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}'")->rowCount();
        if(
$adoptamount >= 10){
        
$mysidia->db->update("users_status", array("fullpantry" => 'unlocked'), "username='{$mysidia->input->get("username")}'");
        } 
(located under public function index)

It's supposed to run when the user just visits the page since I wanted to avoid using buttons for this, but it doesn't work and I can't see why. Any ideas?
__________________
Reply With Quote