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 04-02-2017, 01:27 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,660
Abronsyth is on a distinguished road
Default Some help with object issues?

Wow, another issue! Surprise!

Okay, I'll cut to the chase, I am having issues with this line;
PHP Code:
$bg $mysidia->db->select("owned_adoptables", array("adoptbackground"), "aid" '{$adopt->aid}')->fetchObject(); 
I'm trying to select the data listed in owned_adoptables under adoptbackground

I am getting this error when I try to call it:
Catchable fatal error: Object of class stdClass could not be converted to string in .../public_html/view/myadoptsview.php on line 312

Could someone possibly point out my error?
(For reference, I am making a new function on the myadopts/manage page to remove an item (background) from an adoptable. It needs to distinguish between whether or not the adoptable has a background already so that it doesn't give them an item they don't have).
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #2  
Old 04-04-2017, 07:55 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,660
Abronsyth is on a distinguished road
Default

Figured it out after a lot of playing!

Turns out it is not supposed to be object, instead it is this;
PHP Code:
$bg $mysidia->db->select("owned_adoptables", array("adoptbackground"), "aid = '{$adopt->aid}'")->fetchColumn(); 
Works perfectly now!
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #3  
Old 04-04-2017, 10:37 PM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 31,862
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

Thanks for sharing your solution. :)
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Reply With Quote
Reply

Thread Tools
Display Modes

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: 456 (0 members and 456 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