如何循环通过mysql结果集 [英] How to loop through a mysql result set
本文介绍了如何循环通过mysql结果集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么不同的方法循环通过mysql结果集?我是PHP和MySQL的新手,所以我正在寻找简单的方法循环和解释如何提供的代码工作。
What are some different ways to loop through a mysql result set? I'm new to PHP and MySQL so I'm looking for simple ways to loop through and an explanation as to how the provided code works.
推荐答案
这是一个完整的示例:
Here is a full example:
http://php.net/manual/en/mysqli-result.fetch-array.php
- 连接
- 选择数据库
- 查询
- fetch array to get the row
- Connect
- Select database
- Make query
- Cycle on the result and fetch array to get the row
这篇关于如何循环通过mysql结果集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文