[help] moving values in a table

I have a problem and I’m not sure how to solve it. I hope this isn’t too confusing. I have already confused myself. Ha, ha. :smiley:

Ok, so I have a table with columns called ‘pic_1’, ‘pic_2’, ‘pic_3’, ‘pic_4’ and so on till about *‘pic_40’.

*I have already created a script which places the correct info into the correct column. But the problem I have now is that I need to create a script where you can delete specific pictures from that table.

So basically someone can choose from a list and say they wanna delete *‘pic_22’. *The problem I have is that they can’t do that cause then it will show all the pictures on a another page in a format and somewhere in the middle there will be one picture missing. So I somehow need all the values to shift one back when a picture gets deleted. So if someone deletes *‘pic_10’ then ‘pic_11’s’ *value will shift into ‘pic_10’s’ place and so on. I hope you are following.

How do I go about this? I’m so confused :d: I would really appreciate and help or tips!