I have a certain table already created and populated:
CREATE TABLE 'formulario' (
'id' int(4) NOT NULL AUTO_INCREMENT,
'nome' varbinary(50) DEFAULT NULL,
'carteira' varchar(30) NOT NULL,
'tipo_ocorrencia' varchar(13) NOT NULL,
'contato' varchar(20) DEFAULT NULL,
'tel' varchar(50) DEFAULT NULL,
'mensagem' text NOT NULL,
'data' varchar(10) NOT NULL,
'hora' varchar(8) NOT NULL,
PRIMARY KEY ('id')
) ENGINE=MyISAM AUTO_INCREMENT=3744 DEFAULT CHARSET=utf8;
I'm creating this table now:
CREATE TABLE 'preformulario' (
'id' INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
'r1' VARCHAR( 3 ) NOT NULL ,
'r2' VARCHAR( 160 ) NOT NULL ,
'r3' VARCHAR( 160 ) NOT NULL ,
'r4' VARCHAR( 160 ) NOT NULL ) ENGINE = MYISAM;
I need to export a table that matches the two tables above!
The user will inform the data of the preformulario
table and then begin to inform the data of the formulario
table.
As I explained, the formulario
table is already populated ... Your ID is in 3744.
I have little ... Almost nothing, experience with MySQL. I need to know if I need to create a third table by reconciling the two I mentioned or is there a solution in my PHP that already matches this data?