How to refresh mysql_fetch_assoc() or reset?
Posted: Mon Sep 27, 2004 3:25 pm
I want to display the result from the MySQL database query twice on the page. The first, I have this:
Then further down the page I did this:
Now, the problem is that the second display of result skips the first data in the database. If delete or didn't have the firest display then everything works out fine. So how do I prevent it from skipping the firest data in the datbase?
ljCharlie
Code: Select all
<?
$row_rsScholarshipDetails = mysql_fetch_assoc($rsScholarshipDetails);
$category = $row_rsScholarshipDetails["category"];
echo "Category: ".$category."<br>";
?>Code: Select all
<?
$totalRows = mysql_num_rows($rsScholarshipDetails);
if($totalRows > 0){
while ($row_rsScholarshipDetails = mysql_fetch_assoc($rsScholarshipDetails)){
$require1 = $row_rsScholarshipDetails["reqr1"];
//then create my table and display my results from the query into a
//table
}
}
?>ljCharlie