Jump to the post that solved this thread.
Solved: 1 Year, 7 Months, 3 Weeks ago Plugin Building - Generic SQL Error (Install Function)
#1
Solved: 1 Year, 7 Months, 3 Weeks ago
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}
    ");
}
Reply
#2
Solved: 1 Year, 7 Months, 3 Weeks ago
Only one AUTO_INCREMENT column is allowed per table. Apparently, it's also got to be (part of) a key.
Reply
#3
Solved: 1 Year, 7 Months, 3 Weeks ago
HA, I feel dumb right now.

Thank you!
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 2 Guest(s)