2022-07-09, 07:10 PM
I have a quick question, this particular code works but I don't know how to test it using other DB types for install as I only have MySQL. Does a db write query for creating tables in a MyBB plugin account for other possible db types (like PostgreSQL).
Also, should I be using MyISAM compared to InnoDB? I know I had read SOMEWHERE but cannot remember where that 2.0 future will use InnoDB (possibly false information)?..
I'm new and self teaching while working my way towards a future in Dev but sometimes I just feel like I don't know enough to decipher preferred methods.
if(!$db->table_exists("directory")) {
$db->write_query("
CREATE TABLE ".TABLE_PREFIX."directory (
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` varchar(255) NOT NULL,
`link` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL,
`descr` varchar(255) NOT NULL
) ENGINE=MyISAM;
");
}
Also, should I be using MyISAM compared to InnoDB? I know I had read SOMEWHERE but cannot remember where that 2.0 future will use InnoDB (possibly false information)?..
I'm new and self teaching while working my way towards a future in Dev but sometimes I just feel like I don't know enough to decipher preferred methods.