Blog

Newest Post
Blog Archives
Blog Categories

Portfolio

3D Models
Banners
Brochures
Business Cards
Custom Programming
Environments
Flash Projects
Game Design
Image Altering
Web Design

About

Resume
Recommendation Letters

Contact

February 22, 2008

Reset a php Recordset

Filed under: PHP — admin @ 4:34 pm

When you run a recordset through a loop, you will not be able to re-run the recordset further down in the same page. Here is how to reset the recordset so you can use it again on the same page. Just place this code after your loop. Change the “$Recordset” to your recordset’s variable.

if (mysql_num_rows($Recordset) > 0)  {
mysql_data_seek($Recordset, 0);
$row_Recordset = mysql_fetch_assoc($Recordset);
}

Leave a Reply

© - Digital Epiphany Designs, Online Portfolio for Web Design, Custom Programming, Grapic Design and Game Design.