Hi, I have a script that gets the number of rows in a table and then prints them out in a loop.
However, when I delete a row in the middle, I get problems. I have a few ideas, but which one is best:
- During the loop, check if result=false
- When deleting leave the row intact, but delete the data and raise a delete flag
But, I am interested in what do most people do to get around this problem, especially when adding rows, as I use for the primary key (id) the value of num_rows + 1.