What i mean by my headline is I am trying to select which row by a number define by a function. Let say I have a number 4. The number or data in the database is 10. So if i get the mod of it it will turn out to be 2. How do I select the row 2 from the database and retrive it's data.