MyBB Community Forums

Full Version: Plugin Building - Generic SQL Error (Install Function)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Upon trying to activate an in progress plugin (literally this is the only thing there at the moment) I get a generic in SQL error with no information. Nothing to be found in my error.log and all of that is set up as suggested in the error messages documentation.

I'm not sure where I went wrong here. Any ideas why this is happening?

function wcc_connections_install() {
    global $db;
    // quick build create table collation reference
    $bctcref = $db->build_create_table_collation();
    // CREATE TABLE
    $db->write_query("
        CREATE TABLE IF NOT EXISTS `" . TABLE_PREFIX . "connections` (
            `id` int NOT NULL AUTO_INCREMENT,
            `uid` int NOT NULL AUTO_INCREMENT,
            `cuid` int NOT NULL AUTO_INCREMENT,
            `title` varchar(100) NOT NULL DEFAULT '',
            `description` varchar(500) NOT NULL DEFAULT '',
            PRIMARY KEY (`id`)
        ) ENGINE=MyISAM{$bctcref}
    ");
}
Only one AUTO_INCREMENT column is allowed per table. Apparently, it's also got to be (part of) a key.
HA, I feel dumb right now.

Thank you!