View Single Post
Old 03-16-2011, 10:21 PM  
vdbucks
Monger Cash
 
Industry Role:
Join Date: Jul 2010
Posts: 2,773
Quote:
Originally Posted by qw12er View Post
php 5.3 -yup
Have you tried pulling up the entire query and using maybe a foreach or while loop?

Can it be a simple matter of say...

Quote:
<?php
$idChild = 6 //however you get idChild value

// create a query first in the event you have to do things with the query like mysql_real_escape_string and whatnot
$query = sprintf("SELECT idParent, idChild FROM dbtable WHERE idChild = '%s'");

//process the query
$result = mysql_query($query);

while ($row = mysql_fetch_assoc($result)) {
// do stuff
echo $row['idChild'];
echo $row['idParent'];
}
?>

Last edited by vdbucks; 03-16-2011 at 10:24 PM..
vdbucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote