Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2016, 08:02 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 158,004
Abronsyth is on a distinguished road
Default

Still looking for some help with this
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #2  
Old 01-29-2016, 09:21 AM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 69,206
Hwona is on a distinguished road
Default

Quote:
Originally Posted by Abronsyth View Post
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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:07 PM.

Currently Active Users: 3576 (0 members and 3576 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636