View Single Post
Old 03-16-2011, 10:52 PM  
vdbucks
Monger Cash
 
Industry Role:
Join Date: Jul 2010
Posts: 2,773
Additionally, if you just want to get all idChild values and match them with idParent values, you can modify the above $query to:

$query = sprintf('SELECT idParent, idChild FROM dbtable');

Then change the while line to:

while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
//do stuff
echo $row['idChild'];
echo $row['idParent'];
}
vdbucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote