[ PHPXref.com ] [ Generated: Sun Jul 20 19:12:48 2008 ] [ OSC 2.0.5 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/SQL/ -> Install.sql (source)

   1  # 

   2  CREATE TABLE `church_chu` (
   3    `chu_Church_ID` int(11) NOT NULL auto_increment,
   4    `chu_Church_Name` varchar(100) NOT NULL default '',
   5    `chu_Church_Address1` varchar(100) NOT NULL default '',
   6    `chu_Church_Address2` varchar(100) NOT NULL default '',
   7    `chu_Church_City` varchar(100) NOT NULL default '',
   8    `chu_Church_State` varchar(100) NOT NULL default '',
   9    `chu_Church_postalcode` varchar(100) NOT NULL default '',
  10    `chu_Church_Country` varchar(100) NOT NULL default '',
  11    `chu_Church_URL` varchar(255) NOT NULL default '',
  12    `chu_Church_DateEntered` date NOT NULL default '0000-00-00',
  13    `chu_Church_email` varchar(100) NOT NULL default '',
  14    `chu_Church_phone` varchar(100) NOT NULL default '',
  15    PRIMARY KEY  (`chu_Church_ID`)
  16  ) TYPE=MyISAM; 
  17  
  18  insert into church_chu(chu_Church_ID, chu_Church_Name) values(1,'My Church');
  19  
  20  # Host: localhost

  21  # Database: osc

  22  # Table: 'donationamounts_dna'

  23  # 

  24  CREATE TABLE `donationamounts_dna` (
  25    `dna_don_ID` mediumint(9) unsigned NOT NULL default '0',
  26    `chu_Church_ID` int(11) NOT NULL default '0',
  27    `dna_Amount` decimal(10,2) default NULL,
  28    `dna_fun_ID` tinyint(3) unsigned default NULL,
  29    KEY `dna_don_ID` (`dna_don_ID`)
  30  ) TYPE=MyISAM; 
  31  
  32  # Host: localhost

  33  # Database: osc

  34  # Table: 'donationfund_fun'

  35  # 

  36  CREATE TABLE `donationfund_fun` (
  37    `fun_ID` tinyint(3) NOT NULL auto_increment,
  38    `chu_Church_ID` int(11) NOT NULL default '0',
  39    `fun_Active` enum('true','false') NOT NULL default 'true',
  40    `fun_Name` varchar(30) default NULL,
  41    `fun_Description` varchar(100) default NULL,
  42    PRIMARY KEY  (`fun_ID`),
  43    UNIQUE KEY `fun_ID` (`fun_ID`)
  44  ) TYPE=MyISAM; 
  45  
  46  # Sample data for table `donationfund_fun`

  47  INSERT INTO donationfund_fun VALUES (1,1, 'true', 'General Donation', 'Default fund: General operating expenses.');
  48  INSERT INTO donationfund_fun VALUES (2,1, 'true', 'Missions', 'Support for missions.');
  49  INSERT INTO donationfund_fun VALUES (3,1, 'true', 'Building', 'New building fund.');
  50  
  51  
  52  
  53  # Host: localhost

  54  # Database: osc

  55  # Table: 'donations_don'

  56  # 

  57  CREATE TABLE `donations_don` (
  58    `don_ID` mediumint(9) unsigned NOT NULL auto_increment,
  59    `chu_Church_ID` int(11) NOT NULL default '0',
  60    `don_DonorID` mediumint(9) unsigned default NULL,
  61    `don_PaymentType` tinyint(3) default NULL,
  62    `don_CheckNumber` mediumint(9) unsigned NOT NULL default '0',
  63    `don_Date` date NOT NULL default '0000-00-00',
  64    `don_Envelope` smallint(5) unsigned default NULL,
  65    PRIMARY KEY  (`don_ID`),
  66    KEY `don_DonorID` (`don_DonorID`),
  67    KEY `don_Date` (`don_Date`)
  68  ) TYPE=MyISAM; 
  69  
  70  # Host: localhost

  71  # Database: osc

  72  # Table: 'family_fam'

  73  # 

  74  CREATE TABLE `family_fam` (
  75    `fam_ID` mediumint(9) unsigned NOT NULL auto_increment,
  76    `chu_Church_ID` int(11) NOT NULL default '0',
  77    `fam_Name` varchar(50) default NULL,
  78    `fam_Address1` varchar(255) default NULL,
  79    `fam_Address2` varchar(255) default NULL,
  80    `fam_City` varchar(50) default NULL,
  81    `fam_State` varchar(50) default NULL,
  82    `fam_Zip` varchar(50) default NULL,
  83    `fam_Country` varchar(50) default NULL,
  84    `fam_HomePhone` varchar(30) default NULL,
  85    `fam_WorkPhone` varchar(30) default NULL,
  86    `fam_CellPhone` varchar(30) default NULL,
  87    `fam_Email` varchar(100) default NULL,
  88    `fam_WeddingDate` date default NULL,
  89    `fam_DateEntered` datetime NOT NULL default '0000-00-00 00:00:00',
  90    `fam_DateLastEdited` datetime default NULL,
  91    `fam_EnteredBy` smallint(5) unsigned NOT NULL default '0',
  92    `fam_EditedBy` smallint(5) unsigned default '0',
  93    PRIMARY KEY  (`fam_ID`),
  94    KEY `fam_ID` (`fam_ID`)
  95  ) TYPE=MyISAM; 
  96  
  97  # Host: localhost

  98  # Database: osc

  99  # Table: 'group_grp'

 100  # 

 101  CREATE TABLE `group_grp` (
 102    `grp_ID` mediumint(8) unsigned NOT NULL auto_increment,
 103    `chu_Church_ID` int(11) NOT NULL default '0',
 104    `grp_Type` tinyint(4) NOT NULL default '0',
 105    `grp_RoleListID` mediumint(8) unsigned NOT NULL default '0',
 106    `grp_DefaultRole` mediumint(9) NOT NULL default '0',
 107    `grp_Name` varchar(50) NOT NULL default '',
 108    `grp_Description` text,
 109    `grp_hasSpecialProps` enum('true','false') NOT NULL default 'false',
 110    PRIMARY KEY  (`grp_ID`),
 111    UNIQUE KEY `grp_ID` (`grp_ID`),
 112    KEY `grp_ID_2` (`grp_ID`)
 113  ) TYPE=MyISAM; 
 114  
 115  # Host: localhost

 116  # Database: osc

 117  # Table: 'groupprop_1'

 118  # 

 119  CREATE TABLE `groupprop_1` (
 120    `per_ID` mediumint(8) unsigned NOT NULL default '0',
 121    `c1` enum('false','true') default NULL,
 122    PRIMARY KEY  (`per_ID`),
 123    UNIQUE KEY `per_ID` (`per_ID`)
 124  ) TYPE=MyISAM; 
 125  
 126  # Host: localhost

 127  # Database: osc

 128  # Table: 'groupprop_master'

 129  # 

 130  CREATE TABLE `groupprop_master` (
 131    `grp_ID` mediumint(9) unsigned NOT NULL default '0',
 132    `prop_ID` tinyint(3) unsigned NOT NULL default '0',
 133    `chu_Church_ID` int(11) NOT NULL default '0',
 134    `prop_Field` varchar(5) NOT NULL default '0',
 135    `prop_Name` varchar(40) default NULL,
 136    `prop_Description` varchar(60) default NULL,
 137    `type_ID` smallint(5) unsigned NOT NULL default '0',
 138    `prop_Special` mediumint(9) unsigned default NULL,
 139    `prop_PersonDisplay` enum('false','true') NOT NULL default 'false'
 140  ) TYPE=MyISAM COMMENT='Group-specific properties order, name, description, type'; 
 141  
 142  # Host: localhost

 143  # Database: osc

 144  # Table: 'list_lst'

 145  # 

 146  CREATE TABLE `list_lst` (
 147    `lst_ID` mediumint(8) unsigned NOT NULL default '0',
 148    `chu_Church_ID` int(11) NOT NULL default '0',
 149    `lst_OptionID` mediumint(8) unsigned NOT NULL default '0',
 150    `lst_OptionSequence` tinyint(3) unsigned NOT NULL default '0',
 151    `lst_OptionName` varchar(50) NOT NULL default ''
 152  ) TYPE=MyISAM; 
 153  
 154  # Sample data for member classifications

 155  INSERT INTO list_lst VALUES (1,1, 1, 1, 'Member');
 156  INSERT INTO list_lst VALUES (1,1, 2, 2, 'Regular Attender');
 157  INSERT INTO list_lst VALUES (1,1, 3, 3, 'Guest');
 158  INSERT INTO list_lst VALUES (1,1, 5, 4, 'Non-Attender');
 159  INSERT INTO list_lst VALUES (1,1, 4, 5, 'Non-Attender (staff)');
 160  
 161  # Sample data for family roles

 162  INSERT INTO list_lst VALUES (2,1, 1, 1, 'Head of Household');
 163  INSERT INTO list_lst VALUES (2,1, 2, 2, 'Spouse');
 164  INSERT INTO list_lst VALUES (2,1, 3, 3, 'Child');
 165  INSERT INTO list_lst VALUES (2,1, 4, 4, 'Other Relative');
 166  INSERT INTO list_lst VALUES (2,1, 5, 5, 'Non Relative');
 167  
 168  # Sample data for group types

 169  INSERT INTO list_lst VALUES (3,1, 1, 1, 'Ministry');
 170  INSERT INTO list_lst VALUES (3,1, 2, 2, 'Team');
 171  INSERT INTO list_lst VALUES (3,1, 3, 3, 'Bible Study');
 172  INSERT INTO list_lst VALUES (3,1, 4, 4, 'Sunday School Class');
 173  
 174  # Insert the custom-field / group-property types

 175  INSERT INTO list_lst VALUES (4,1, 1, 1, 'True / False');
 176  INSERT INTO list_lst VALUES (4,1, 2, 2, 'Date');
 177  INSERT INTO list_lst VALUES (4,1, 3, 3, 'Text Field (50 char)');
 178  INSERT INTO list_lst VALUES (4,1, 4, 4, 'Text Field (100 char)');
 179  INSERT INTO list_lst VALUES (4,1, 5, 5, 'Text Field (Long)');
 180  INSERT INTO list_lst VALUES (4,1, 6, 6, 'Year');
 181  INSERT INTO list_lst VALUES (4,1, 7, 7, 'Season');
 182  INSERT INTO list_lst VALUES (4,1, 8, 8, 'Number');
 183  INSERT INTO list_lst VALUES (4,1, 9, 9, 'Person from Group');
 184  INSERT INTO list_lst VALUES (4,1, 10, 10, 'Money');
 185  INSERT INTO list_lst VALUES (4,1, 11, 11, 'Phone Number');
 186  INSERT INTO list_lst VALUES (4,1, 12, 12, 'Custom Drop-Down List');
 187  
 188  
 189  # Host: localhost

 190  # Database: osc

 191  # Table: 'note_nte'

 192  # 

 193  CREATE TABLE `note_nte` (
 194    `nte_ID` mediumint(8) unsigned NOT NULL auto_increment,
 195    `chu_Church_ID` int(11) NOT NULL default '0',
 196    `nte_per_ID` mediumint(8) unsigned NOT NULL default '0',
 197    `nte_fam_ID` mediumint(8) unsigned NOT NULL default '0',
 198    `nte_Private` mediumint(8) unsigned NOT NULL default '0',
 199    `nte_Text` text,
 200    `nte_DateEntered` datetime NOT NULL default '0000-00-00 00:00:00',
 201    `nte_DateLastEdited` datetime default NULL,
 202    `nte_EnteredBy` mediumint(8) unsigned NOT NULL default '0',
 203    `nte_EditedBy` mediumint(8) unsigned NOT NULL default '0',
 204    PRIMARY KEY  (`nte_ID`)
 205  ) TYPE=MyISAM; 
 206  
 207  # Host: localhost

 208  # Database: osc

 209  # Table: 'old_donationamounts_dna'

 210  # 

 211  CREATE TABLE `old_donationamounts_dna` (
 212    `dna_don_ID` mediumint(9) unsigned NOT NULL default '0',
 213    `dna_Amount` decimal(10,2) default NULL,
 214    `dna_fun_ID` tinyint(3) unsigned default NULL,
 215    KEY `dna_don_ID` (`dna_don_ID`)
 216  ) TYPE=MyISAM; 
 217  
 218  # Host: localhost

 219  # Database: osc

 220  # Table: 'person2group2role_p2g2r'

 221  # 

 222  CREATE TABLE `person2group2role_p2g2r` (
 223    `p2g2r_per_ID` mediumint(8) unsigned NOT NULL default '0',
 224    `p2g2r_grp_ID` mediumint(8) unsigned NOT NULL default '0',
 225    `chu_Church_ID` int(11) NOT NULL default '0',
 226    `p2g2r_rle_ID` mediumint(8) unsigned NOT NULL default '0',
 227    PRIMARY KEY  (`p2g2r_per_ID`,`p2g2r_grp_ID`),
 228    KEY `p2g2r_per_ID` (`p2g2r_per_ID`,`p2g2r_grp_ID`,`p2g2r_rle_ID`)
 229  ) TYPE=MyISAM; 
 230  
 231  # Host: localhost

 232  # Database: osc

 233  # Table: 'person_custom'

 234  # 

 235  CREATE TABLE `person_custom` (
 236    `per_ID` mediumint(9) NOT NULL default '0',
 237    `chu_Church_ID` int(11) NOT NULL default '0',
 238    `c1` date default NULL,
 239    `c2` enum('false','true') default NULL,
 240    `c3` enum('winter','spring','summer','fall') default NULL,
 241    PRIMARY KEY  (`per_ID`)
 242  ) TYPE=MyISAM; 
 243  
 244  # Host: localhost

 245  # Database: osc

 246  # Table: 'person_custom_master'

 247  # 

 248  CREATE TABLE `person_custom_master` (
 249    `custom_Order` smallint(6) NOT NULL default '0',
 250    `chu_Church_ID` int(11) NOT NULL default '0',
 251    `custom_Field` varchar(5) NOT NULL default '',
 252    `custom_Name` varchar(40) NOT NULL default '',
 253    `custom_Special` mediumint(8) unsigned default NULL,
 254    `custom_Side` enum('left','right') NOT NULL default 'left',
 255    `type_ID` tinyint(4) NOT NULL default '0'
 256  ) TYPE=MyISAM; 
 257  
 258  # Host: localhost

 259  # Database: osc

 260  # Table: 'person_per'

 261  # 

 262  CREATE TABLE `person_per` (
 263    `per_ID` mediumint(9) unsigned NOT NULL auto_increment,
 264    `chu_Church_ID` int(11) NOT NULL default '0',
 265    `per_Title` varchar(50) default NULL,
 266    `per_FirstName` varchar(50) default NULL,
 267    `per_MiddleName` varchar(50) default NULL,
 268    `per_LastName` varchar(50) default NULL,
 269    `per_Suffix` varchar(50) default NULL,
 270    `per_Address1` varchar(50) default NULL,
 271    `per_Address2` varchar(50) default NULL,
 272    `per_City` varchar(50) default NULL,
 273    `per_State` varchar(50) default NULL,
 274    `per_Zip` varchar(50) default NULL,
 275    `per_Country` varchar(50) default NULL,
 276    `per_HomePhone` varchar(30) default NULL,
 277    `per_WorkPhone` varchar(30) default NULL,
 278    `per_CellPhone` varchar(30) default NULL,
 279    `per_Email` varchar(50) default NULL,
 280    `per_WorkEmail` varchar(50) default NULL,
 281    `per_BirthMonth` tinyint(3) unsigned NOT NULL default '0',
 282    `per_BirthDay` tinyint(3) unsigned NOT NULL default '0',
 283    `per_BirthYear` year(4) default NULL,
 284    `per_MembershipDate` date default NULL,
 285    `per_Gender` tinyint(1) unsigned NOT NULL default '0',
 286    `per_fmr_ID` tinyint(3) unsigned NOT NULL default '0',
 287    `per_cls_ID` tinyint(3) unsigned NOT NULL default '0',
 288    `per_fam_ID` smallint(5) unsigned NOT NULL default '0',
 289    `per_Envelope` smallint(5) unsigned default NULL,
 290    `per_DateLastEdited` datetime default NULL,
 291    `per_DateEntered` datetime NOT NULL default '0000-00-00 00:00:00',
 292    `per_EnteredBy` smallint(5) unsigned NOT NULL default '0',
 293    `per_EditedBy` smallint(5) unsigned default '0',
 294    PRIMARY KEY  (`per_ID`),
 295    KEY `per_ID` (`per_ID`)
 296  ) TYPE=MyISAM; 
 297  
 298  
 299  INSERT INTO person_per VALUES (1,1,NULL,'OSC',NULL,'Admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0000,NULL,0,0,0,0,NULL,NULL,'2001-02-05 18:00:00',0,0);
 300  
 301  
 302  # Host: localhost

 303  # Database: osc

 304  # Table: 'property_pro'

 305  # 

 306  CREATE TABLE `property_pro` (
 307    `pro_ID` mediumint(8) unsigned NOT NULL auto_increment,
 308    `chu_Church_ID` int(11) NOT NULL default '0',
 309    `pro_Class` varchar(10) NOT NULL default '',
 310    `pro_prt_ID` mediumint(8) unsigned NOT NULL default '0',
 311    `pro_Name` varchar(200) NOT NULL default '0',
 312    `pro_Description` text NOT NULL,
 313    `pro_Prompt` varchar(255) default NULL,
 314    PRIMARY KEY  (`pro_ID`),
 315    UNIQUE KEY `pro_ID` (`pro_ID`),
 316    KEY `pro_ID_2` (`pro_ID`)
 317  ) TYPE=MyISAM; 
 318  
 319  INSERT INTO property_pro VALUES (1,1,'p',1,'Disabled','has a disability.','What is the nature of the disability?');
 320  INSERT INTO property_pro VALUES (2,1,'f',2,'Single Parent','is a single-parent household.','');
 321  INSERT INTO property_pro VALUES (3,1,'g',3,'Youth','is youth-oriented.','');
 322  
 323  # Host: localhost

 324  # Database: osc

 325  # Table: 'propertytype_prt'

 326  # 

 327  CREATE TABLE `propertytype_prt` (
 328    `prt_ID` mediumint(9) NOT NULL auto_increment,
 329    `chu_Church_ID` int(11) NOT NULL default '0',
 330    `prt_Class` varchar(10) NOT NULL default '',
 331    `prt_Name` varchar(50) NOT NULL default '',
 332    `prt_Description` text NOT NULL,
 333    PRIMARY KEY  (`prt_ID`),
 334    UNIQUE KEY `prt_ID` (`prt_ID`),
 335    KEY `prt_ID_2` (`prt_ID`)
 336  ) TYPE=MyISAM; 
 337  
 338  INSERT INTO propertytype_prt VALUES (1,1,'p','General','General Person Properties');
 339  INSERT INTO propertytype_prt VALUES (2,1,'f','General','General Family Properties');
 340  INSERT INTO propertytype_prt VALUES (3,1,'g','General','General Group Properties');
 341  
 342  
 343  # Host: localhost

 344  # Database: osc

 345  # Table: 'query_qry'

 346  # 

 347  CREATE TABLE `query_qry` (
 348    `qry_ID` mediumint(8) unsigned NOT NULL auto_increment,
 349    `chu_Church_ID` int(11) NOT NULL default '0',
 350    `qry_SQL` text NOT NULL,
 351    `qry_Name` varchar(255) NOT NULL default '',
 352    `qry_Description` text NOT NULL,
 353    `qry_Count` tinyint(1) unsigned NOT NULL default '0',
 354    PRIMARY KEY  (`qry_ID`),
 355    UNIQUE KEY `qry_ID` (`qry_ID`),
 356    KEY `qry_ID_2` (`qry_ID`)
 357  ) TYPE=MyISAM; 
 358  
 359  INSERT INTO query_qry VALUES (2,1,'SELECT COUNT(per_ID)\nAS \'Count\'\nFROM person_per','Person Count','Returns the total number of people in the database.',0);
 360  INSERT INTO query_qry VALUES (3,1,'SELECT CONCAT(\'<a href=FamilyView.php?FamilyID=\',fam_ID,\'>\',fam_Name,\'</a>\') AS \'Family Name\', COUNT(*) AS \'No.\'\nFROM person_per\nINNER JOIN family_fam\nON fam_ID = per_fam_ID\nGROUP BY per_fam_ID\nORDER BY \'No.\' DESC','Family Member Count','Returns each family and the total number of people assigned to them.',0);
 361  INSERT INTO query_qry VALUES (4,1,'SELECT per_ID as AddToCart,CONCAT(\'<a href=PersonView.php?PersonID=\',per_ID,\'>\',per_FirstName,\' \',per_LastName,\'</a>\') AS Name, CONCAT(per_BirthMonth,\'/\',per_BirthDay,\'/\',per_BirthYear) AS \'Birth Date\', \nYEAR(CURRENT_DATE) - per_BirthYear AS \'Age\'\nFROM person_per\nWHERE\nDATE_ADD(CONCAT(per_BirthYear,\'-\',per_BirthMonth,\'-\',per_BirthDay),INTERVAL ~min~ YEAR) <= CURDATE()\nAND\nDATE_ADD(CONCAT(per_BirthYear,\'-\',per_BirthMonth,\'-\',per_BirthDay),INTERVAL ~max~ YEAR) >= CURDATE()','Person by Age','Returns any person records with ages between two given ages.',1);
 362  INSERT INTO query_qry VALUES (6,1,'SELECT COUNT(per_ID) AS Total FROM person_per WHERE per_Gender = ~gender~','Total By Gender','Total of records matching a given gender.',0);
 363  INSERT INTO query_qry VALUES (7,1,'SELECT per_ID as AddToCart, CONCAT(per_FirstName,\' \',per_LastName) AS Name FROM person_per WHERE per_fmr_ID = ~role~ AND per_Gender = ~gender~','Person by Role and Gender','Selects person records with the family role and gender specified.',1);
 364  INSERT INTO query_qry VALUES (9,1,'SELECT \r\nper_ID as AddToCart, \r\nCONCAT(per_FirstName,\' \',per_LastName) AS Name, \r\nCONCAT(r2p_Value,\' \') AS Value\r\nFROM person_per,record2property_r2p\r\nWHERE per_ID = r2p_record_ID\r\nAND r2p_pro_ID = ~PropertyID~\r\nORDER BY per_LastName','Person by Property','Returns person records which are assigned the given property.',1);
 365  INSERT INTO query_qry VALUES (10,1, 'SELECT CONCAT(\'<a href=PersonView.php?PersonID=\',per_ID,\' target=view>\', per_FirstName,\' \', per_MiddleName,\' \', per_LastName,\'</a>\') AS Name, CONCAT(\'<a href=DonationView.php?PersonID=\',per_ID,\' target=view>\', \'$\',sum(round(dna_amount,2)),\'</a>\') as Amount\r\nFROM donations_don, person_per\r\nLEFT JOIN donationamounts_dna ON don_ID = dna_don_ID\r\nWHERE don_DonorID = per_ID AND don_date >= \'~startdate~\'\r\nAND don_date <= \'~enddate~\'\r\nGROUP BY don_DonorID\r\nORDER BY per_LastName ASC', 'Total Donations by Member', 'Sum of donations by member for a specific period of time between two dates.', 1);
 366  INSERT INTO query_qry VALUES (11,1,'SELECT fun_name as Fund, CONCAT(\'$\',sum(round(dna_amount,2))) as Total\r\nFROM donations_don\r\nLEFT JOIN donationamounts_dna ON donations_don.don_ID = donationamounts_dna.dna_don_ID LEFT JOIN donationfund_fun ON donationamounts_dna.dna_fun_ID = donationfund_fun.fun_ID\r\nWHERE don_date >= \'~startdate~\'\r\nAND don_date <= \'~enddate~\'\r\nGROUP BY fun_id\r\nORDER BY fun_name', 'Total Donations by Fund', 'Sum of donations by FUND for a specific period of time between two dates.', 1);
 367  INSERT INTO query_qry VALUES (15,1, 'SELECT per_ID as AddToCart, CONCAT(\'<a href=PersonView.php?PersonID=\',per_ID,\'>\',per_FirstName,\' \',per_MiddleName,\' \',per_LastName,\'</a>\') AS Name, \r\nper_City as City, per_State as State,\r\nper_Zip as ZIP, per_HomePhone as HomePhone\r\nFROM person_per \r\nWHERE ~searchwhat~ LIKE \'%~searchstring~%\'', 'Advanced Search', 'Search by any part of Name, City, State, Zip, or Home Phone.', 1);
 368  
 369  
 370  # Host: localhost

 371  # Database: osc

 372  # Table: 'queryparameteroptions_qpo'

 373  # 

 374  CREATE TABLE `queryparameteroptions_qpo` (
 375    `qpo_ID` smallint(5) unsigned NOT NULL auto_increment,
 376    `chu_Church_ID` int(11) NOT NULL default '0',
 377    `qpo_qrp_ID` mediumint(8) unsigned NOT NULL default '0',
 378    `qpo_Display` varchar(50) NOT NULL default '',
 379    `qpo_Value` varchar(50) NOT NULL default '',
 380    PRIMARY KEY  (`qpo_ID`),
 381    UNIQUE KEY `qpo_ID` (`qpo_ID`)
 382  ) TYPE=MyISAM; 
 383  
 384  INSERT INTO queryparameteroptions_qpo VALUES (1,1, 4,'Male','1');
 385  INSERT INTO queryparameteroptions_qpo VALUES (2,1, 4,'Female','2');
 386  INSERT INTO queryparameteroptions_qpo VALUES (3,1, 6,'Male','1');
 387  INSERT INTO queryparameteroptions_qpo VALUES (4,1, 6,'Female','2');
 388  INSERT INTO queryparameteroptions_qpo VALUES (5,1,  15, 'Name', 'CONCAT(per_FirstName,per_MiddleName,per_LastName)');
 389  INSERT INTO queryparameteroptions_qpo VALUES (6,1,  15, 'Zip Code', 'per_Zip');
 390  INSERT INTO queryparameteroptions_qpo VALUES (7,1, 15, 'State', 'per_State');
 391  INSERT INTO queryparameteroptions_qpo VALUES (8, 1,15, 'City', 'per_City');
 392  INSERT INTO queryparameteroptions_qpo VALUES (9,1, 15, 'Home Phone', 'per_HomePhone');
 393  
 394  # Host: localhost

 395  # Database: osc

 396  # Table: 'queryparameters_qrp'

 397  # 

 398  CREATE TABLE `queryparameters_qrp` (
 399    `qrp_ID` mediumint(8) unsigned NOT NULL auto_increment,
 400    `qrp_qry_ID` mediumint(8) unsigned NOT NULL default '0',
 401    `chu_Church_ID` int(11) NOT NULL default '0',
 402    `qrp_Type` tinyint(3) unsigned NOT NULL default '0',
 403    `qrp_OptionSQL` text,
 404    `qrp_Name` varchar(25) default NULL,
 405    `qrp_Description` text,
 406    `qrp_Alias` varchar(25) default NULL,
 407    `qrp_Default` varchar(25) default NULL,
 408    `qrp_Required` tinyint(3) unsigned NOT NULL default '0',
 409    `qrp_InputBoxSize` tinyint(3) unsigned NOT NULL default '0',
 410    `qrp_Validation` varchar(5) NOT NULL default '',
 411    `qrp_NumericMax` int(11) default NULL,
 412    `qrp_NumericMin` int(11) default NULL,
 413    `qrp_AlphaMinLength` int(11) default NULL,
 414    `qrp_AlphaMaxLength` int(11) default NULL,
 415    PRIMARY KEY  (`qrp_ID`),
 416    UNIQUE KEY `qrp_ID` (`qrp_ID`),
 417    KEY `qrp_qry_ID` (`qrp_qry_ID`),
 418    KEY `qrp_ID_2` (`qrp_ID`)
 419  ) TYPE=MyISAM; 
 420  
 421  INSERT INTO queryparameters_qrp VALUES (1,4,1,0,NULL,'Minimum Age','The minimum age for which you want records returned.','min','0',0,5,'n',120,0,NULL,NULL);
 422  INSERT INTO queryparameters_qrp VALUES (2,4,1,0,NULL,'Maximum Age','The maximum age for which you want records returned.','max','120',1,5,'n',120,0,NULL,NULL);
 423  INSERT INTO queryparameters_qrp VALUES (4,6,1,1,'','Gender','The desired gender to search the database for.','gender','1',1,0,'',0,0,0,0);
 424  INSERT INTO queryparameters_qrp VALUES (5,7,1,2,'SELECT lst_OptionID as Value, lst_OptionName as Display FROM list_lst WHERE lst_ID=2 ORDER BY lst_OptionSequence','Family Role','Select the desired family role.','role','1',0,0,'',0,0,0,0);
 425  INSERT INTO queryparameters_qrp VALUES (6,7,1,1,'','Gender','The gender for which you would like records returned.','gender','1',1,0,'',0,0,0,0);
 426  INSERT INTO queryparameters_qrp VALUES (8,9,1,2,'SELECT pro_ID AS Value, pro_Name as Display \r\nFROM property_pro\r\nWHERE pro_Class= \'p\' \r\nORDER BY pro_Name ','Property','The property for which you would like person records returned.','PropertyID','0',1,0,'',0,0,0,0);
 427  INSERT INTO queryparameters_qrp VALUES (9, 10,1, 2, 'SELECT distinct don_date as Value, don_date as Display FROM donations_don ORDER BY don_date ASC', 'Beginning Date', 'Please select the beginning date to calculate total contributions for each member (i.e. YYYY-MM-DD). NOTE: You can only choose dates that conatain donations.', 'startdate', '1', 1, 0, '0', 0, 0, 0, 0);
 428  INSERT INTO queryparameters_qrp VALUES (10, 10,1, 2, 'SELECT distinct don_date as Value, don_date as Display FROM donations_don\r\nORDER BY don_date DESC', 'Ending Date', 'Please enter the last date to calculate total contributions for each member (i.e. YYYY-MM-DD).', 'enddate', '1', 1, 0, '', 0, 0, 0, 0);
 429  INSERT INTO queryparameters_qrp VALUES (14, 15,1, 0, '', 'Search', 'Enter any part of the following: Name, City, State, Zip, or Home Phone.', 'searchstring', '', 1, 0, '', 0, 0, 0, 0);
 430  INSERT INTO queryparameters_qrp VALUES (15, 15,1, 1, '', 'Field', 'Select field to search for.', 'searchwhat', '1', 1, 0, '', 0, 0, 0, 0);
 431  INSERT INTO queryparameters_qrp VALUES (16, 11,1, 2, 'SELECT distinct don_date as Value, don_date as Display FROM donations_don ORDER BY don_date ASC', 'Beginning Date', 'Please select the beginning date to calculate total contributions for each member (i.e. YYYY-MM-DD). NOTE: You can only choose dates that conatain donations.', 'startdate', '1', 1, 0, '0', 0, 0, 0, 0);
 432  INSERT INTO queryparameters_qrp VALUES (17, 11,1, 2, 'SELECT distinct don_date as Value, don_date as Display FROM donations_don\r\nORDER BY don_date DESC', 'Ending Date', 'Please enter the last date to calculate total contributions for each member (i.e. YYYY-MM-DD).', 'enddate', '1', 1, 0, '', 0, 0, 0, 0);
 433  
 434  
 435  # Host: localhost

 436  # Database: osc

 437  # Table: 'record2property_r2p'

 438  # 

 439  CREATE TABLE `record2property_r2p` (
 440    `r2p_pro_ID` mediumint(8) unsigned NOT NULL default '0',
 441    `r2p_record_ID` mediumint(8) unsigned NOT NULL default '0',
 442    `chu_Church_ID` int(11) NOT NULL default '0',
 443    `r2p_Value` text NOT NULL
 444  ) TYPE=MyISAM; 
 445  
 446  # Host: localhost

 447  # Database: osc

 448  # Table: 'user_usr'

 449  # 

 450  CREATE TABLE `user_usr` (
 451    `usr_per_ID` mediumint(9) unsigned NOT NULL default '0',
 452    `chu_Church_ID` int(11) default '0',
 453    `usr_Password` varchar(50) NOT NULL default '',
 454    `usr_NeedPasswordChange` tinyint(3) unsigned NOT NULL default '0',
 455    `usr_LastLogin` datetime NOT NULL default '0000-00-00 00:00:00',
 456    `usr_LoginCount` smallint(5) unsigned NOT NULL default '0',
 457    `usr_FailedLogins` tinyint(3) unsigned NOT NULL default '0',
 458    `usr_AddRecords` tinyint(3) unsigned NOT NULL default '0',
 459    `usr_EditRecords` tinyint(3) unsigned NOT NULL default '0',
 460    `usr_DeleteRecords` tinyint(3) unsigned NOT NULL default '0',
 461    `usr_MenuOptions` tinyint(3) unsigned NOT NULL default '0',
 462    `usr_ManageGroups` tinyint(3) unsigned NOT NULL default '0',
 463    `usr_Finance` tinyint(3) unsigned NOT NULL default '0',
 464    `usr_Communication` tinyint(3) unsigned NOT NULL default '0',
 465    `usr_Notes` tinyint(3) unsigned NOT NULL default '0',
 466    `usr_Admin` tinyint(3) unsigned NOT NULL default '0',
 467    `usr_Workspacewidth` smallint(6) default NULL,
 468    `usr_BaseFontSize` tinyint(4) default NULL,
 469    `usr_SearchLimit` tinyint(4) default '10',
 470    `usr_Login` varchar(100) NOT NULL default '',
 471    `usr_Style` varchar(50) default 'Style.css',
 472    PRIMARY KEY  (`usr_per_ID`),
 473    KEY `usr_per_ID` (`usr_per_ID`)
 474  ) TYPE=MyISAM; 
 475  
 476  INSERT INTO user_usr VALUES (1,1,'3af0e3bbc3d4c00ac8294887eef91280',1,NOW(),0,0,0,0,1,1,1,1,1,1,1,580, 9,10,'Admin','Style.css');
 477  
 478  
 479  


[ Powered by PHPXref - Served by Debian GNU/Linux ]