| 1 |
<?php |
<?php |
| 2 |
// random_image.install |
// random_images.install |
| 3 |
|
|
| 4 |
function random_image_install() { |
function random_images_install() { |
| 5 |
switch ($GLOBALS['db_type']) { |
switch ($GLOBALS['db_type']) { |
| 6 |
case 'mysql': |
case 'mysql': |
| 7 |
case 'mysqli': |
case 'mysqli': |
| 8 |
// the {tablename} syntax is so multisite installs can add a |
// the {tablename} syntax is so multisite installs can add a |
| 9 |
// prefix to the table name as set in the settings.php file |
// prefix to the table name as set in the settings.php file |
| 10 |
db_query("CREATE TABLE IF NOT EXISTS `random_image_blocks` ( |
db_query("CREATE TABLE IF NOT EXISTS {random_image_blocks} ( |
| 11 |
`bid` int(10) unsigned NOT NULL auto_increment, |
`bid` int(10) unsigned NOT NULL auto_increment, |
| 12 |
`name` varchar(128) NOT NULL default '', |
`name` varchar(128) NOT NULL default '', |
| 13 |
`path` varchar(128) NOT NULL default '', |
`path` varchar(128) NOT NULL default '', |
| 14 |
`count` int(10) unsigned NOT NULL default '0', |
`count` int(10) unsigned NOT NULL default '0', |
| 15 |
PRIMARY KEY (`bid`) |
PRIMARY KEY (`bid`) |
| 16 |
) /*!40100 DEFAULT CHARACTER SET utf8 */;"); |
) /*!40100 DEFAULT CHARACTER SET utf8 */;"); |
| 17 |
break; |
break; |
| 18 |
|
|
| 19 |
case 'pgsql': |
case 'pgsql': |
| 20 |
drupal_set_message("pgsql is not yet supported - sorry!"); |
drupal_set_message("pgsql is not yet supported - sorry!"); |
| 21 |
break; |
break; |
| 22 |
} |
} |
| 23 |
} |
} |
| 24 |
?> |
?> |