class array not being defined
Posted: Wed Jun 25, 2003 2:38 pm
hello,
i have the following code which selects information from a databse and stores it in an array clas var
My problem is while im able to print the returned query info only one set of it is sotred in the array $this->Children
no i know for a fact (tru debuggin) that there are 2 rows of result...why am i getting only one value in the array when i
foreach($children as child) echo child?
Kendall
i have the following code which selects information from a databse and stores it in an array clas var
Code: Select all
$Children = mysql_query($Query, $Connection) or die(mysql_error());
$Child = mysql_fetch_assoc($Children);
if(mysql_num_rows($Children)>0){
do{
echo $Child['INDID'].' - '.$Child['FName'].' '.$Child['MName'].' '.$Children['LName'];
$this->Children = array($Child['INDID']=>$Child['FName'].' '.$Child['MName'].' '.$Child['LName']);
}while($Child = mysql_fetch_assoc($Children));
}no i know for a fact (tru debuggin) that there are 2 rows of result...why am i getting only one value in the array when i
foreach($children as child) echo child?
Kendall