I have a mysql field that I need to rename, the problem is that I don't know what type it currently is. I know that you can do it like this:
ALTER TABLE users CHANGE test test2 VARCHAR( 12 ) NOT NULL
But that doesn't work because the type will not always be VARCHAR(12). I tried this:
ALTER TABLE users CHANGE test test2
But it would not work without the type of the field. I may be able to do it using mysql_field_type and the like, but I'm wondering if there is an easier way. Any ideas?