I have two while loops running one after the other (not inside of each other) - I\'ve simplified the code a bit so that only the important parts of it are listed below. The
After the first while() loop completes, the internal pointer in the MySQL result is at the end of itself. You need to tell it to go back to the beginning using mysql_data_seek() between the first and second loops: