mysql_fetch_array是否添加所有行? [英] mysql_fetch_array add all rows?
本文介绍了mysql_fetch_array是否添加所有行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将mysql_query的所有行添加到mysql_fetch_array()?我希望能够尽可能有效地执行此操作,因为它可能需要处理很多行.
How can you add all the rows from a mysql_query to a mysql_fetch_array()? I want to be able to do it as efficiently as possible as it could be working with quite a few rows.
推荐答案
最常见的方法:
$rows = array();
while(($row = mysql_fetch_array($result))) {
$rows[] = $row;
}
这篇关于mysql_fetch_array是否添加所有行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文