PDA

View Full Version : create database table on install


ppp512
12-11-2017, 02:23 PM
Hello,

I am working on a simple mod, but I don't know how to create/drop a database table on install/uninstall. I have no idea what class I should use. Could someone please help me out with this? What should I paste in the installation/uninstallation code section (besides the "CREATE TABLE" and "DROP" queries)? A simple example would be welcome.

Thanks in advance

noypiscripter
12-14-2017, 04:25 AM
Install:
$vbulletin->db->hide_errors();
$vbulletin->db->query("CREATE TABLE QUERY HERE....");
$vbulletin->db->show_errors();

Uninstall:
$vbulletin->db->hide_errors();
$vbulletin->db->query("DROP TABLE QUERY HERE...");
$vbulletin->db->show_errors();