I’m trying to create a table with this function in Codeigniter
public function createTable($connectionString) {
$createString = "CREATE TABLE {$this->getTabela()} (
`data` datetime NOT NULL,
`idempregado` varchar(45) DEFAULT NULL,
`nif` varchar(15) DEFAULT NULL,
`idsociedade` bigint(20) DEFAULT NULL,
`tipo` varchar(45) DEFAULT NULL,
PRIMARY KEY (`data`),
KEY `fk_assiduidade_user1` (`idempregado`,`nif`,`idsociedade`),
CONSTRAINT `fk_assiduidade_user1` FOREIGN KEY (`idempregado`, `nif`, `idsociedade`) REFERENCES `user` (`idempregado`, `nif`, `idsociedade`) ON DELETE NO ACTION ON UPDATE NO ACTION
)
ENGINE=FEDERATED
DEFAULT CHARSET=utf8
CONNECTION='$connectionString'";
var_dump($createString);
var_dump($this->getDbConnect()->conn_id);
var_dump($this->getDbConnect()->query($createString));
}
But the query is always returning False.
As you guys can see i already made 3 var_dumps to check if its all OK.
Ca you guys help me get to the point where this don’t execute the query?
Regards,
Elkas
I just found the problem.
After talking with technicians at the Data center (because i dont have access to any logs) i found that they have the FEDERATED engine disabled.
Problem Solved.
Thanks for the tips.