Mysidia Adoptables Support Forum  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-30-2012, 05:05 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 84,178
SilverDragonTears is on a distinguished road
Default More fetching from tables help

This snippet of code is suppose to get the names of the parents and show them. As it is now... it shows nothing. I can get it to show the id of the parents, but I'd like it to show their names.

Code:
$result = $adopts->select("owned_adoptables", array(), "aid='{$id}'");
	while ($row = $result->fetchObject()) {
$father=$row->father;
$mother=$row->mother;

$getFather = $adopts->select("owned_adoptables", array(), "aid='{$father}'");
                         
$getMother = $adopts->select("owned_adoptables", array(), "aid='{$mother}'");
$nFather = $row->getFather;
$nFather = $nFather['name'];
$nMother = $row->getMother;
$nMother = $nMother['name'];
if(empty($row->father)) {
    $article_content .= '<b>Caught On:';
} else {
    $article_content .= '<b>Laid On:';
     
}

$article_content .= "{$row->date}<br>";



if($father == '' && $nMother == '') {
    $article_content .= '';
} else {
    $article_content .= 'Father: ' . $nFather . '<br> 
                  Mother: ' . $nMother . '<br>';
    
}

}
__________________

Check out SilvaTales
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shop Tables SilverDragonTears Questions and Supports 1 02-02-2013 03:26 PM
Tables StarGirl Questions and Supports 3 04-26-2012 02:57 PM
Joining Tables SilverDragonTears Questions and Supports 24 04-10-2012 01:54 AM
No tables in database? Fangs Questions and Supports 1 02-28-2012 11:26 AM
Tables in myadoptables.php rosepose Questions and Supports 7 03-12-2009 06:29 PM


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

Currently Active Users: 973 (0 members and 973 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