The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
I need some help with my first product.
I read the vb.com docs, but I'm having trouble with creating tables in the installation code. Here's what I'm doing: Code:
$db->hide_errors();
$db->query_write("
CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX . "TABLENAME
(
tableid int(32) NOT NULL,
PRIMARY KEY (tableid)
) TYPE=MyISAM
");
$db->show_errors();
It just won't create the table. Can anyone point out my mistake? Please? |
|
#2
|
||||
|
||||
|
If your talking about the <installcode></installcode> in product xml...
$vbulletin->db->query_write I am still new to vb database but maybe one of these below? ~pulled the code from installed mods. Code:
<installcode>
<![CDATA[
$db->hide_errors();
$vbulletin->db->query_write("
CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX . "TABLENAME
(
`tableid` int(32) NOT NULL default '0',
PRIMARY KEY (`tableid`)
) TYPE=MyISAM
");
]]></installcode>
Code:
<installcode>
<![CDATA[
$db->hide_errors();
$vbulletin->db->query_write("
CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX . "TABLENAME
(
`tableid` int(32) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
) TYPE=MyISAM
");
]]></installcode>
|
|
#3
|
||||
|
||||
|
That didn't work either... So I started randomly looking at mods here and I took out:
Code:
$db->hide_errors(); That way the SQL errors would show LOLIt ended up being a ) out of place. Thank you for your help. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|