Elliott F. Cable wrote:
So, this is my first attempt at a script - of course
it doesn't work,
I have absolutely no idea what I'm doing, just went through some
mediawiki, mint, and phpBB code and pulled out bits that looked
relevant and threw them together. Could somebody either try to fix
this, or write a quick script to go through a mySQL table and add a
number (402) to every entry in a given column?
Do yourself a favor and skip the PHP; this is what SQL was made for. :)
UPDATE mytable SET mytable_user=mytable_user+402;
or to avoid breaking anonymous & scripted edits something like this should work:
UPDATE mytable SET mytable_user=IF(mytable_user,mytable_user+402,0);
You'll also need to take care that you don't have conflicting usernames, since
usernames must be unique.
-- brion vibber (brion @
pobox.com)