OK
I think I have an idea, but pay close attention its sort of complicated.
Setup an auto_increment field, not to tell what number row it is, but just to serve as a unique value to the row.
Then, when you pull a row from the database, to find out what row it is, you would find out how many rows there are up to that record.
So, you would run another query as follows
$number_record=mysql_num_rows(mysql_query("SELECT * FROM `table` WHERE id<=$row_id"));
the id field is the auto_increment, andthe $row_id variable needs to be populated with the id from the row you are pulling.
Hope this helps you
Chris