I'm working on a project that will query the database, get some data, and display it in a nice little html table. No problem... that's done. The way I do that is by mysql_fetch_assoc and loop through each row. no problem so far.
What I want to accomplish is read the FIRST row and the LAST row from the database before entering the loop that reads all rows.
I've tried using the mysql_fetch_row and a few other variations thereof, but they all seem to increment the internal pointer so that when I go into my loop, it's not starting from the beginning.
How can I accomplish this? Looping through them all is easy, no prob. But
I want to fetch the FIRST and LAST row from my query, and THEN proceed to loop through them all.