[SOLVED]UMIL installing DB question.

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
Blue Blood
Registered User
Posts: 762
Joined: Sat Apr 11, 2009 7:09 am
Location: U§A
Name: Blue Blood
Contact:

[SOLVED]UMIL installing DB question.

Post by Blue Blood » Wed Jul 13, 2011 3:22 am

How do I add this table to a UMIL install.php

I know how to do the actual table & columns, but I can't figure to how to do the INSERT INTO

Can anyone help PLEASE!!

Thanks!!!

Code: Select all

$versions = array(
	'0.1.0'	=> array(
		// add terms_privacy table
		'table_add' => array(
			array('phpbb_terms_privacy', array(
				'COLUMNS'		=> array(
					'terms_privacy_draft'				=> array('TEXT_UNI', ''),
					'terms_privacy_draft_uid'			=> array('VCHAR:8', ''),
					'terms_privacy_draft_bitfield'		=> array('VCHAR:255', ''),
					'terms_privacy_draft_options'		=> array('UINT:11', 7),
					'terms_text'						=> array('TEXT_UNI', ''),
					'trems_text_uid'					=> array('VCHAR:8', ''),,
					'trems_text_bitfield'				=> array('VCHAR:255', ''),
					'trems_text_options'				=> array('UINT:11', 7),
					'privacy_text'						=> array('TEXT_UNI', ''),
					'privacy_text_uid'					=> array('VCHAR:8', ''),
					'privacy_text_bit'					=> array('VCHAR:255', ''),
					'privacy_text_opt'					=> array('UINT:11', 7),
					'terms_title'						=> array('VCHAR:255', ''),
					'privacy_title'						=> array('VCHAR:255', ''),
			),
		),
	),
);

Code: Select all

DROP TABLE IF EXISTS `phpbb_terms_privacy`;
CREATE TABLE IF NOT EXISTS `phpbb_terms_privacy` (
  `terms_privacy_draft` text COLLATE utf8_bin NOT NULL,
  `terms_privacy_draft_uid` varchar(8) COLLATE utf8_bin NOT NULL DEFAULT '',
  `terms_privacy_draft_bitfield` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `terms_privacy_draft_options` int(11) unsigned NOT NULL DEFAULT '7',
  `terms_text` text COLLATE utf8_bin NOT NULL,
  `trems_text_uid` varchar(8) COLLATE utf8_bin NOT NULL DEFAULT '',
  `trems_text_bitfield` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `trems_text_options` int(11) unsigned NOT NULL DEFAULT '7',
  `privacy_text` text COLLATE utf8_bin NOT NULL,
  `privacy_text_uid` varchar(8) COLLATE utf8_bin NOT NULL DEFAULT '',
  `privacy_text_bit` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `privacy_text_opt` int(11) unsigned NOT NULL DEFAULT '7',
  `terms_title` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `privacy_title` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

Code: Select all

INSERT INTO `phpbb_terms_privacy` (`terms_privacy_draft`, `terms_privacy_draft_uid`, `terms_privacy_draft_bitfield`, `terms_privacy_draft_options`, `terms_text`, `terms_text_uid`, `terms_text_bitfield`, `terms_text_options`, `privacy_text`, `privacy_text_uid`, `privacy_text_bit`, `privacy_text_opt`, `terms_title`, `privacy_title`) VALUES
(0x5b636f6c6f723d7265643a34396a6c346438375d5b623a34396a6c346438375d4242205465726d732026205072697661637920494e204143502044726166745b2f623a34396a6c346438375d5b2f636f6c6f723a34396a6c346438375d2063616e206265207365656e20686572652121203c212d2d20733a6d72677265656e3a202d2d3e3c696d67207372633d227b534d494c4945535f504154487d2f69636f6e5f6d72677265656e2e6769662220616c743d223a6d72677265656e3a22207469746c653d224d722e20477265656e22202f3e3c212d2d20733a6d72677265656e3a202d2d3e, '49jl4d87', 'Qg==', 7, 0x5b636f6c6f723d7265643a3375346761736b365d5b623a3375346761736b365d205465726d73206f66207573655b2f623a3375346761736b365d5b2f636f6c6f723a3375346761736b365d2063616e206265207365656e20686572652121203c212d2d20733a6d72677265656e3a202d2d3e3c696d67207372633d227b534d494c4945535f504154487d2f69636f6e5f6d72677265656e2e6769662220616c743d223a6d72677265656e3a22207469746c653d224d722e20477265656e22202f3e3c212d2d20733a6d72677265656e3a202d2d3e, '3u4gask6', 'Qg==', 7, 0x5b636f6c6f723d677265656e3a3365686d656634665d5b623a3365686d656634665d5072697661637920706f6c6963795b2f623a3365686d656634665d5b2f636f6c6f723a3365686d656634665d2063616e206265207365656e20686572652121203c212d2d20733a77696e6b3a202d2d3e3c696d67207372633d227b534d494c4945535f504154487d2f69636f6e5f655f77696e6b2e6769662220616c743d223a77696e6b3a22207469746c653d2257696e6b22202f3e3c212d2d20733a77696e6b3a202d2d3e, '3ehmef4f', 'Qg==', 7, 'Terms of use', 'Privacy policy');
Last edited by Blue Blood on Tue Jul 26, 2011 5:42 am, edited 1 time in total.

User avatar
Blue Blood
Registered User
Posts: 762
Joined: Sat Apr 11, 2009 7:09 am
Location: U§A
Name: Blue Blood
Contact:

Re: UMIL installing DB question.

Post by Blue Blood » Thu Jul 14, 2011 8:04 am

Still no solution

Anyone Please!! :?

User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Re: UMIL installing DB question.

Post by EXreaction » Tue Jul 26, 2011 3:23 am

If you've not found the solution yet: http://wiki.phpbb.com/Umil.table_row_insert

If you need a more complicated insert you should make your own custom function (use 'custom' => (function name))

User avatar
Blue Blood
Registered User
Posts: 762
Joined: Sat Apr 11, 2009 7:09 am
Location: U§A
Name: Blue Blood
Contact:

Re: [SOLVED]UMIL installing DB question.

Post by Blue Blood » Tue Jul 26, 2011 5:43 am

Thanks man, Yes I figured it out.

Locked

Return to “[3.0.x] MOD Writers Discussion”