in reply to Re^2: Increment DB using Perl
in thread Increment DB using Perl

"UPDATE request SET ID='$new_id'";
Always sets ALL rows in request to $new_id. You should use some kind of WHERE clause to limit the effect, but that might not help you here. Also, it isn't exactly good practice to change the primary keys of existing rows (I'm assuming request.id is the primary key).

Maybe you want to skip the SELECT and just do 1 query like

UPDATE request set ID=ID+1;
updated: that last piece of code doesn't do what is wanted.