Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Database stuff
- $exists = $queries->tableExists('vote_settings');
- if(empty($exists)){
- // Create tables
- try {
- $data = $queries->createTable("vote_settings", " `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(20) NOT NULL, `value` varchar(2048) NOT NULL, PRIMARY KEY (`id`)", "ENGINE=InnoDB DEFAULT CHARSET=latin1");
- $data = $queries->createTable("vote_sites", " `id` int(11) NOT NULL AUTO_INCREMENT, `site` varchar(512) NOT NULL, `name` varchar(64) NOT NULL, PRIMARY KEY (`id`)", "ENGINE=InnoDB DEFAULT CHARSET=latin1");
- // Insert data
- $queries->create('vote_settings', array(
- 'name' => 'vote_message',
- 'value' => ''
- ));
- $queries->create('vote_settings', array(
- 'name' => 'link_location',
- 'value' => '1'
- ));
- $queries->create('vote_settings', array(
- 'name' => 'icon',
- 'value' => '1'
- ));
- } catch(Exception $e){
- // Error
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement