Quote:
Originally Posted by Abronsyth
Still looking for some help with this 
|
Okay... I'm not sure if this will work, but declare a new adopt in the adopt file (if not already declared):
$adopt = new Adoptable($mysidia->input->post("id"));
Then:
$cost = $adopt->getCost();
$usermoney = $mysidia->db->select("users", array("money"), "username = {$mysidia->user->username}")->fetchColumn();
$newusermoney = $usermoney - $cost;
$mysidia->db->update("users", array("money" => $newusermoney), "username='{$mysidia->user->username}'");
....
Is this what you need?