1
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 am 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 reconciles the two tables above!
The user will inform the table data preformulario
and then begin to inform the table data formulario
.
As I explained, the table formulario
is already populated... Your ID is in 3744.
I have very little... experience with Mysql. I need to know if I need to create a third table reconciling the two I mentioned or if there is a solution in my PHP that already reconciles these data?
Hi, @Regis Faria. I don’t quite understand, my dear! What did you mean by "Insert pege"? How did you explain how I can link the same user? Like, if the guy fills the first table and fills the second, how do I link the two inserts... Display the two in a single SELECT?
– Jhonatan Junio