sassy_geekette sassy_geekette - 1 year ago 94
MySQL Question

How to loop through a mysql result set

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.

Answer Source

Here is a full example:

  1. Connect
  2. Select database
  3. Make query
  4. Cycle on the result and fetch array to get the row
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download