function ad_html_install in Advertisement 5
Same name and namespace in other branches
- 5.2 html/ad_html.install \ad_html_install()
- 6.3 html/ad_html.install \ad_html_install()
- 6 html/ad_html.install \ad_html_install()
- 6.2 html/ad_html.install \ad_html_install()
Ad_html module database schema. Copyright (c) 2007 Jeremy Andrews <jeremy@kerneltrap.org>. All rights reserved.
File
- html/
ad_html.install, line 9
Code
function ad_html_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
default:
/**
* The ad_html table stores the html ad.
*/
db_query("CREATE TABLE {ad_html} (\n aid INT(10) UNSIGNED NOT NULL DEFAULT '0',\n\n html TEXT NULL,\n\n PRIMARY KEY (aid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
break;
case 'pgsql':
/**
* The ad_html table stores the html ad.
*/
db_query("CREATE TABLE {ad_html} (\n aid INT NOT NULL DEFAULT '0' PRIMARY KEY,\n\n html TEXT NOT NULL DEFAULT ''\n );");
break;
}
drupal_set_message(t('The necessary ad_html module tables have been created.'));
}