fr@nkie Posted October 27, 2006 Share Posted October 27, 2006 Hi. I asked before, but I still don't understand what is wrong with SQL command.I now that is not a permission issue.I try the suggestion " Add 'ENGINE = InnoDB' " and it doesn't work to :(This is the SQL command that doesn't work:CREATE TABLE Associacoes( id_patrimonio1 INTEGER, id_patrimonio2 INTEGER, observacoes VARCHAR(255), CONSTRAINT chave_primaria_associacao PRIMARY KEY (id_patrimonio1,id_patrimonio2), CONSTRAINT chave_estrangeira_id_patrimonio1 FOREIGN KEY (id_patrimonio1) REFERENCES Patrimonio (id_patrimonio) ON UPDATE CASCADE ON DELETE SET NULL, CONSTRAINT chave_estrangeira_id_patrimonio2 FOREIGN KEY (id_patrimonio2) REFERENCES Patrimonio (id_patrimonio) ON UPDATE CASCADE ON DELETE SET NULL);It works if I take the FOREIGN KEY's CONSTRAINT's out. Like this:CREATE TABLE Associacoes( id_patrimonio1 INTEGER, id_patrimonio2 INTEGER, observacoes VARCHAR(255), CONSTRAINT chave_primaria_associacao PRIMARY KEY (id_patrimonio1,id_patrimonio2));Please help me! Thank you! :) Link to comment Share on other sites More sharing options...
effigy Posted October 27, 2006 Share Posted October 27, 2006 It looks like MyISAM is your default. Try specifying the InnoDB engine:[tt]CREATE TABLE Associacoes( ...) ENGINE = InnoDB;[/tt] Link to comment Share on other sites More sharing options...
shoz Posted October 27, 2006 Share Posted October 27, 2006 fr@nkie this is the fourth topic (one already deleted) that you've created about this issue. If you'd like to continue using this forum follow the [url=http://www.phpfreaks.com/forums/index.php/topic,6264.0.html]Board Guidelines[/url] as mentioned in the PM that was sent to you previously. Link to comment Share on other sites More sharing options...
Recommended Posts