Looking at the code it seems that the reference to the content is coming just after a loop on the recordset. The loop starts with a do and ends with a while. After the while is a mysql_fetch_assoc call. This call grabs the data for the current record and updates the pointer. I think this might be the problem you are experiencing. In order to get the recordset reset you will need to add in some code like this before you try to display the content:
This should reset the internal pointer of the rs to the first record, then the fetch call will get the data for that record and update the pointer for the next record.