Posted by Marnok.com on 04/16/07 18:41
Here's a snip from my code:
$childinfo = mysql_query("SELECT * FROM data WHERE `parent`=".$g);
if (mysql_num_rows($childinfo) > 0)
{
echo mysql_num_rows($childinfo).'<br>';
while ($pass = mysql_fetch_array($childinfo))
{
echo 'some text here';
}
}
My problem:
the echo of mysql_num_rows displays 2 or 3 depending on number of records
but the 'some text here' displays only once, displaying last matching item
in DB. I would expect it to do once for each entry.
(of course in my live code this line displays info about retrieved row)
Am I doing/expecting something stupid I haven't thought about, or is
something actually going wrong?
--
*****************************************
http://www.marnok.com
*****************************************
Navigation:
[Reply to this message]
|