Microsoft Excel is a handy tool for creating text with repeating patterns. It is the only common tool I can think of that easily combines algebraic and text operations. For example, today I created a set of INSERT statements as follows. In column 1, I created a series of numbers from 6 to 49 using the formula
Then, in the second column,
="INSERT INTO `slots` SET `eventid`='2', `jobid`=" & A1 & ", `slots`='2'"
The result looks like this:
Now it’s an easy copy/paste into phpMyAdmin‘s SQL query window, and the task is complete. I find this a lot faster than writing a short script to accomplish the same task.