I need to edit a field type in a MySQL table. Currently I have this one column set as VARCHAR that I need to change to an INT. The catch is that I do not have access to the control panel so I cannot simply flip the switch. How do I go about making this edit with PHP?
Share
Just execute an
ALTER TABLEstatementIn PHP:
If you require extra attributes on that column, such as
NOT NULL,PRIMARY KEY, or others, be sure to include them in theALTERstatement, just after the data typeINT.