Posted by : Anjana Jayaweera Tuesday, November 5, 2013

Actually, what we going to do is to move the internal row pointer to re-query. For this, Im going to use the mysql function mysql_data_seek().

The internal row pointer is the current row position in a result returned by the mysql_query() function.

$sql    = "SELECT * FROM tbl_data";
$result = mysql_query($sql,$con);

while ($row = mysql_fetch_array($result)) {
   /* Show your data here*/

/* Call the result info again*/


//  you can change the 0 into any number. From this, it will control from which row number you want to start the query again.

while ($row = mysql_fetch_array($result)) {
   /* Show your data for the 2nd time */

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

Blogger templates


- Copyright © My Code Genius by 2 Geniuses -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -