maestrodamuz Posted February 9, 2009 Share Posted February 9, 2009 I am trying to serially number data in a table when ouputed on my web page, I could echo the "id"s, but in the case that I delete an entry the numbering becomes messed up....is there any other way of achieving this? Quote Link to comment https://forums.phpfreaks.com/topic/144543-printing-entries-as-they-appear-in-a-table/ Share on other sites More sharing options...
premiso Posted February 9, 2009 Share Posted February 9, 2009 Assuming that this is using MySQL, not unless you want to add a huge overload to your server. My suggestion is do not display the id, instead put a counter in the loop to show them as "1-5" and you do not have to worry about this problem. To do it with MySQL, you would have to dump the current data, delete the table, recreate the table then re-input the data to the table, which as stated, too much of a load on the database server. Quote Link to comment https://forums.phpfreaks.com/topic/144543-printing-entries-as-they-appear-in-a-table/#findComment-758486 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.