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 03-01-2013, 10:26 PM
Infernette Infernette is offline
CODE CODE CODE CODE CODE
 
Join Date: Jan 2013
Location: Where I live? I live home.
Posts: 164
Gender: Female
Credits: 24,160
Infernette is on a distinguished road
Default A little (more)help :)

Well, I'm making an adoptables selling sort of page, but the thing is, I cannot for the life of me figure how to get the mysql database from inserting $mysidia->user->username instead of the actual name when it updates the pet once it's purchased.

*!code removed to prevent usage until finished!* ;)


The problem is at the end, starts here "}
elseif($mysidia->input->action() == "purchase"){
" , posting whole code just in case it's something earlier on.

-Also, I have to say thank you guys for all the previous help you've given 'newbie' me. It really helped me learn how to do this a lot better than staring at a couple of paragraphs.
__________________
No, I have no idea what I'm doing. But it works. Barely.

Last edited by Infernette; 03-02-2013 at 09:39 AM.
Reply With Quote
  #2  
Old 03-01-2013, 11:18 PM
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,392
Hall of Famer is on a distinguished road
Default

I did not look much into the detail, but it seems that there's something wrong with this line:

PHP Code:
$mysidia->db->update("owned_adoptables", array("owner" => '{$user}',"selling" => 'no'), "aid ='$adopt->aid'"); 
which should be:

PHP Code:
$mysidia->db->update("owned_adoptables", array("owner" => $user"selling" => 'no'), "aid ='{$adopt->aid}'"); 
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 03-01-2013, 11:26 PM
Infernette Infernette is offline
CODE CODE CODE CODE CODE
 
Join Date: Jan 2013
Location: Where I live? I live home.
Posts: 164
Gender: Female
Credits: 24,160
Infernette is on a distinguished road
Default

It still seems to not credit it to the right user (Instead it gives it to $user XD), and that is the line that is giving me the problem indeed... I'll spend some more time trying to figure what it's doing tomorrow to see if I can fix it on my own, hopefully.
__________________
No, I have no idea what I'm doing. But it works. Barely.
Reply With Quote
  #4  
Old 03-02-2013, 12:53 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,392
Hall of Famer is on a distinguished road
Default

Well apparently you have another error in your mysql database update query. Find every instance of:

PHP Code:
"owner" => '{$user}'
And replace by:

PHP Code:
"owner" => $user
If it still wont fix your problem, please post a screenshot and I will see what is causing the problem exactly. Also I am a bit confused at where exactly the error is. Does the script insert a row in database under the user '$user', or that it is just $user being displayed on the screen while nothing is abnormal from database?
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 03-02-2013, 09:38 AM
Infernette Infernette is offline
CODE CODE CODE CODE CODE
 
Join Date: Jan 2013
Location: Where I live? I live home.
Posts: 164
Gender: Female
Credits: 24,160
Infernette is on a distinguished road
Default

Thanks, I got it to work.
__________________
No, I have no idea what I'm doing. But it works. Barely.
Reply With Quote
  #6  
Old 03-02-2013, 04:09 PM
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,392
Hall of Famer is on a distinguished road
Default

You are very welcome, glad to see that you are doing some serious customization for your site atm.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #7  
Old 03-02-2013, 05:20 PM
Infernette Infernette is offline
CODE CODE CODE CODE CODE
 
Join Date: Jan 2013
Location: Where I live? I live home.
Posts: 164
Gender: Female
Credits: 24,160
Infernette is on a distinguished road
Default

I have plans to set up a public breeding script now that I have this working. :)
__________________
No, I have no idea what I'm doing. But it works. Barely.
Reply With Quote
  #8  
Old 03-02-2013, 08:01 PM
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,392
Hall of Famer is on a distinguished road
Default

A breeding script? Thats interesting, I am actually working on an advanced breeding system for the next Mys v1.3.3 release. Will post details about it in a blog post in a few days, but Id like to know if people have other ideas in mind.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
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 07:32 AM.

Currently Active Users: 868 (0 members and 868 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636