gilmore1975
Technical User
Hi folks.
I've been dumped in charge of an intranet site that has various php pages. One of the pages is a member list.
Quite simply, this page lists members in the order that they were added to the mysql database that contains them.
At the moment, I have a list of members under a member table that are pulled from the db in ascending order according to their member ID (1-25).
I now just want to add a new row to the member table (via phpmyadmin) and add a member with the ID of 4, so that he appears under member #3. The php page will then put him in the right place in the list.
The trouble is that there is already a member #4, so I can't just change his member # to 4 (obvious primary key error occurs).
My question is, how can I simply slip in a new member where I want, so that the consequent members and there member ID's all shift one place down in the table?
I'm obviously no php pro and don't plan to be, it's just every so often I need to change a member ID in this way and I'm clueless as to how to do it.
I hope you can help. TIA.
G.
I've been dumped in charge of an intranet site that has various php pages. One of the pages is a member list.
Quite simply, this page lists members in the order that they were added to the mysql database that contains them.
At the moment, I have a list of members under a member table that are pulled from the db in ascending order according to their member ID (1-25).
I now just want to add a new row to the member table (via phpmyadmin) and add a member with the ID of 4, so that he appears under member #3. The php page will then put him in the right place in the list.
The trouble is that there is already a member #4, so I can't just change his member # to 4 (obvious primary key error occurs).
My question is, how can I simply slip in a new member where I want, so that the consequent members and there member ID's all shift one place down in the table?
I'm obviously no php pro and don't plan to be, it's just every so often I need to change a member ID in this way and I'm clueless as to how to do it.
I hope you can help. TIA.
G.