I want to change a datatype in a table i've created from tinyint to integer(yes, i made a cock-up).
it's the table index and i don't want to mess any of the data up.
What is the exact syntax to put in PHP for this?
Thanks, Hugh Newsome
Are you sure that your PHP code cares?
normally you can simply alter the table definitions in-situ and all will be well. If using mysql then I suggest installing phpmyAdmin if you have not already done so, it is a fairly friendly tool.
The SQL sintax to modify datatype is like this:
Alter yourTable modify yourColumn anyType(anyNumber);
Then simply use [man]mysql_query[/man] function.
I have installed PHPMyAdmin on my server and it works great, i didn't realise that users could do it, i thought it was only avaialable to ISP's.
Cheers, Hugh