rudyten Posted October 28, 2010 Share Posted October 28, 2010 need help. am learning php oop. Logic below breaks when processing second parent. $db was defined a second time? Suggestions? Do i need to define new database for child??? $db = new Database; $Query = ('Select parentId from PARENT'); $db->query($Query); while ($db->nextRecord()){ $PARENT_ID = $db->Record['PARENT_ID']; $PARENT_NAME = $db->Record['PARENT_NAME']; $Query = ('Select * from CHILD where CHILD_PARENT_ID = $PARENT_ID'); $db->query($Query); while ($db->nextRecord()){ print "child name: $db->Record['CHILD_NAME']; } } Link to comment https://forums.phpfreaks.com/topic/217120-php-oop-database-class-need-help-am-learning/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.