Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open(my $fh, '>', 'queries.txt') or die "Could not open file 'queries.txt' $!";
- print "Starting!\n";
- my $count = 0;
- my $min = 56;
- my $max = 1001;
- for($i = $min; $i < $max; $i++)
- {
- print $fh "INSERT INTO items (id) VALUES ('$i');\n";
- if($i < ($max -1))
- {
- print $fh "DELETE FROM items WHERE id = '$i';\n";
- }
- else
- {
- print $fh "DELETE FROM items WHERE id = '$i';";
- }
- $count++;
- print "Query $count processed.\n";
- }
- close $fh;
- print "Processed $count queries.\n";
- print "Done!\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement