从db减少/增加顺序删除文章php [关闭]

First of all I wish you a new happy year! So I have 3 articles for example and each of them has an order, like 1,2,3. If I want to delete the last article for example, the order of the other articles still remain the same 1,2. But if I delete the first article the orders of the others should decrease with 1 and if I delete the middle one only the order of the last article should decrease. Now how to do this in php? I refer to delete in database Any idea is appreciated. I don't have any code yet because I wanted to find first a solution, I only give the id of the article, the order and the category from which it belongs:

 if($_POST['actiune'] == 'updateArticle'){
        $id_article = $_GET['id'];
        $ord = $_GET['order'];
        $categ = $_GET['categ'];


    }

You could do an update after each delete. Something like:

UPDATE [ArticleTable] SET [OrderColumn]=[OrderColumn]-1 WHERE [OrderColumn]>=[ORDERVALUE_FROM_DELETED_ITEM]