if...
$query = "SELECT col1,col2,col3 FROM table WHERE id > 100"
$result = mysql_query($query);
for this action:
while ($row = mysql_fetch_array($result)){
....
}
is this doing 1 loop (iterated x times)?
and for this one:
$row = mysql_fetch_array($result)
foreach($row as $r){
...
}
is this doing 2 loops (iterated x times)?
where x is the number of results
EDIT:
ok thanks guys, ok I basically phrased this question really, really badly.
in retrospect it should have been
'does mysql_fetch_array() only return one
row each time it is called'
I an now happy that my understanding of mysql_fetch_array() was v. incorrect!
thanks for your time!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…