We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

AgentPhoenix on 01/24/08


Tagged

mysql loop


Versions (?)


While Loop from MySQL Query


Published in: PHP 


  1. $sql = "SELECT * FROM table WHERE column = 1";
  2. $result = mysql_query( $sql );
  3.  
  4. while( $fetch = mysql_fetch_array( $result ) ) {
  5. extract( $fetch, EXTR_OVERWRITE );
  6. }

Report this snippet 

You need to login to post a comment.