function formdefaults_install in Form Defaults 5.2
Same name and namespace in other branches
- 8 formdefaults.install \formdefaults_install()
- 5.3 formdefaults.install \formdefaults_install()
- 5 formdefaults.install \formdefaults_install()
- 6.2 formdefaults.install \formdefaults_install()
- 6 formdefaults.install \formdefaults_install()
- 7 formdefaults.install \formdefaults_install()
File
- ./
formdefaults.install, line 2
Code
function formdefaults_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {formdefaults_forms} (\n formid varchar(255),\n formdata longtext,\n key fromid (formid)\n ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
db_query("CREATE TABLE {formdefaults_forms} (\n formid varchar(255),\n formdata text,\n PRIMARY KEY (formid)\n );");
break;
}
db_query("UPDATE {system} SET weight = 20 WHERE name = 'formdefaults'");
}