I'm not good at describing, so I'll leave an example.
I have this structure.
CREATE TABLE IF NOT EXISTS 'Teste' (
'ID' int(11) NOT NULL AUTO_INCREMENT,
'Var_1' varchar(255) NOT NULL,
'Var_3' varchar(255) NOT NULL,
'Var_5' varchar(255) NOT NULL,
'Var_7' int(11) NOT NULL,
'Var_9' int(11) NOT NULL,
'Var_11' varchar(255) NOT NULL
PRIMARY KEY ('ID')
)
Now I have this new structure:
CREATE TABLE IF NOT EXISTS 'Teste' (
'ID' int(11) NOT NULL AUTO_INCREMENT,
'Var_1' varchar(255) NOT NULL,
'Var_2' varchar(255) NOT NULL,
'Var_3' varchar(255) NOT NULL,
'Var_4' varchar(255) NOT NULL,
'Var_5' varchar(255) NOT NULL,
'Var_6' varchar(255) NOT NULL,
'Var_7' int(11) NOT NULL,
'Var_8' int(11) NOT NULL,
'Var_9' int(11) NOT NULL,
'Var_10' int(11) NOT NULL,
'Var_11' varchar(255) NOT NULL
PRIMARY KEY ('ID')
)
How do I override the old table with the new one, I have no idea where to start, I would like it to detect itself and join automatically, how do I detect it in PHP? Give me a light I'll turn around. Thanks ^^