I don't find a mysql function that returns the position of a record
That's because there isn't one. SQL has no concept of physical data storage at all--that's how it can be so widely used from msql and mysql all the way up to Oracle and DB/2 and not have to change anything.
As far as how to do what you need to do, Mr ProgrammerMan has the answer--create your own uniquely numbered column via auto_increment.