Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
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>'; } } |
Thread Tools | |
Display Modes | |
|
|
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 |
What's New? |
What's Hot? |
What's Popular? |