I have an old database that has an int based id field, the int is directly related to a class id number in our classified system. We are updating our classified system and all class ids are now 4 digits, so class 22 is now class 0022 as far as our system is concerned.
This causes a problem when I go to do matches.
I wrote a little php script to update the database, but it does nothing to mysql because it doesn't see the zeros at the front of the number. Here's an example:
mysql> update test set id = 0022 where id = 22;
Query OK, 0 rows affected (0.01 sec)
Rows matched: 1 Changed: 0 Warnings: 0
Anyone know how I can get my database id's changed to 00##?
Thanks!