
Basically, I can't get the darn thing to create the table (there's only one so far - avoiding use of the _seq table).
Below is the relevant part of my code (the rest is just permissions/log stuff):
Code: Select all
## DB initialization ##
$db =& $gCms->GetDb();
$dict = NewDataDictionary($db);
$table_dbtype = array('mysql'=>'TYPE=MyISAM', 'mysqli'=>'TYPE=MyISAM');
## Table schema ##
$table_schema = "
id I(11) AUTO PRIMARY,
title C(64),
message X,
from I(11),
to I(11),
from_viewed L,
to_viewed L,
from_deleted L,
to_deleted L,
from_vdate T,
to_vdate T,
from_ddate T,
to_ddate T,
created T
";
## SQL execution ##
// Main table
$sqlarray = $dict->CreateTableSQL(cms_db_prefix().'module_privatemessages', $table_schema, $table_dbtype);
$dict->ExecuteSQLArray($sqlarray);
Thanks in advance