-- 
-- Host: localhost    Database: wldburl
-- ------------------------------------------------------

CREATE SCHEMA `wldburl` ;
use `wldburl`;

--
-- Table structure for table `aboutpage`
--

CREATE TABLE `aboutpage` (
  `langId` char(12) NOT NULL DEFAULT 'en',
  `headline` varchar(254) DEFAULT NULL,
  `subheadlineOne` varchar(254) DEFAULT NULL,
  `pageBodyOne` varchar(4500) DEFAULT NULL,
  `subheadlineTwo` varchar(254) DEFAULT NULL,
  `pageBodyTwo` varchar(4500) DEFAULT NULL,
  `page` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`langId`)
);

--
-- Table structure for table `buttons`
--

CREATE TABLE `buttons` (
  `btnid` int(11) NOT NULL AUTO_INCREMENT,
  `btnname` varchar(45) DEFAULT NULL,
  `page` varchar(45) DEFAULT NULL,
  `promocode` varchar(45) DEFAULT NULL,
  `hosted_button_id` varchar(45) DEFAULT NULL,
  `btncomment` varchar(4500) DEFAULT NULL,
  `btncode` varchar(4500) DEFAULT NULL,
  PRIMARY KEY (`btnid`)
);

--
-- Table structure for table `chatlog_test`
--

CREATE TABLE `chatlog_test` (
  `msig` int(11) NOT NULL DEFAULT '0',
  `email` varchar(45) NOT NULL DEFAULT '',
  `chatmem` varchar(512) NOT NULL DEFAULT '',
  `mmem` varchar(45) DEFAULT NULL,
  `message` text NOT NULL,
  `trans` text,
  `snd` varchar(3) NOT NULL DEFAULT '',
  `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP
);

--
-- Table structure for table `companypage`
--

CREATE TABLE `companypage` (
  `langId` char(12) NOT NULL DEFAULT 'en',
  `headline` varchar(254) DEFAULT NULL,
  `subheadline` varchar(254) DEFAULT NULL,
  `pageBody` varchar(4500) DEFAULT NULL,
  `page` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`langId`)
);

--
-- Table structure for table `contactpage`
--

CREATE TABLE `contactpage` (
  `langId` char(12) NOT NULL DEFAULT 'en',
  `headline` varchar(254) DEFAULT NULL,
  `street` varchar(254) DEFAULT NULL,
  `phone` varchar(254) DEFAULT NULL,
  `email` varchar(254) DEFAULT NULL,
  `page` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`langId`)
);

--
-- Table structure for table `countries`
--

CREATE TABLE `countries` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Autoincrementing unique key',
  `ECOUNTRY` varchar(45) NOT NULL COMMENT 'English Language Country Name (used to create a common value)',
  `LCOUNTRY` varchar(60) NOT NULL COMMENT 'Local Language Country Name (used in visual dialog)',
  `CATEGORY` varchar(45) NOT NULL COMMENT 'Category of the Country (Region/Area)',
  `DEFAULT` varchar(1) NOT NULL DEFAULT 'F' COMMENT 'Is this the default selection?',
  PRIMARY KEY (`ID`)
);

--
-- Table structure for table `email_contacts`
--

CREATE TABLE `email_contacts` (
  `contactid` varchar(38) NOT NULL DEFAULT 'GUID',
  `fname` varchar(255) DEFAULT NULL,
  `lname` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `contactts` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `unsubscribe` char(1) DEFAULT 'N',
  PRIMARY KEY (`contactid`)
);
DELIMITER ;;
CREATE TRIGGER `email_contacts_BEFORE_INSERT` BEFORE INSERT ON `email_contacts` FOR EACH ROW
BEGIN
IF new.contactid="GUID" then
   SET new.contactid=UUID();
end if;
END;;
DELIMITER ;

--
-- Table structure for table `email_lists`
--

CREATE TABLE `email_lists` (
  `listid` varchar(38) NOT NULL,
  `contactid` varchar(38) NOT NULL,
  `Listname` varchar(45) DEFAULT 'All Contacts',
  PRIMARY KEY (`listid`,`contactid`)
);

--
-- Table structure for table `faq`
--

CREATE TABLE `faq` (
  `faq_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Serializer - can be reordered if needed',
  `faqq` varchar(256) NOT NULL COMMENT 'FAQ Question',
  `faqa` varchar(4096) NOT NULL COMMENT 'FAQ Answer',
  PRIMARY KEY (`faq_id`)
);

--
-- Table structure for table `form_fields`
--

CREATE TABLE `form_fields` (
  `fieldid` varchar(38) NOT NULL DEFAULT 'GUID',
  `formid` varchar(38) NOT NULL,
  `flang` varchar(5) NOT NULL DEFAULT 'en',
  `fseq` int(11) NOT NULL AUTO_INCREMENT,
  `fname` varchar(450) DEFAULT NULL,
  `ftype` varchar(10) DEFAULT 'text',
  `fsnam` varchar(45) DEFAULT NULL,
  `freq` char(1) DEFAULT 'Y',
  PRIMARY KEY (`fieldid`),
  UNIQUE KEY `fseq_UNIQUE` (`fseq`)
);
DELIMITER ;;
CREATE TRIGGER `form_fields_BINS` BEFORE INSERT ON `form_fields` FOR EACH ROW
BEGIN
IF new.fieldid="GUID" then
   SET new.fieldid=UUID();
end if;

END;;
DELIMITER ;

--
-- Table structure for table `formvals`
--

CREATE TABLE `formvals` (
  `valsid` int(11) NOT NULL AUTO_INCREMENT,
  `subid` varchar(38) NOT NULL,
  `evt` varchar(38) NOT NULL,
  `frm` varchar(38) NOT NULL,
  `fld` varchar(38) NOT NULL,
  `val` varchar(450) NOT NULL,
  `fvts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`valsid`)
);

--
-- Table structure for table `friends`
--

CREATE TABLE `friends` (
  `memid` varchar(38) NOT NULL COMMENT 'Member requesting friend connection',
  `friid` varchar(38) NOT NULL COMMENT 'member to whom friendship is requested',
  `proid` varchar(38) NOT NULL DEFAULT 'none' COMMENT 'The Profile that was Flagged in the Friend Request',
  `block` varchar(1) DEFAULT NULL COMMENT 'If blocked - no communicaiton is possible in the opposite direction.  You can unblock your blocks.',
  PRIMARY KEY (`memid`,`friid`)
);

--
-- Table structure for table `genres`
--

CREATE TABLE `genres` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Serialized Unique Identifier for Genres',
  `GENNAME` varchar(45) NOT NULL COMMENT 'Genre name stored in database',
  `DISPNAME` varchar(45) NOT NULL COMMENT 'Display Name used for Visual Elements',
  `CATEGORY` varchar(45) DEFAULT NULL COMMENT 'Genre Categories (not used yet)',
  `DISPNAMEEN` varchar(45) DEFAULT NULL,
  `DISPNAMEES` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`ID`)
);

--
-- Table structure for table `grouptypes`
--

CREATE TABLE `grouptypes` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Autoincrementing Field for Unique Identificaiton of a Group Type',
  `GROUPNAME` varchar(45) NOT NULL COMMENT 'Group Type Stored in the database',
  `DISPNAME` varchar(45) NOT NULL COMMENT 'Visual Name for Group Types for User Interface Elements',
  `CATEGORY` varchar(45) DEFAULT NULL COMMENT 'Group Type Categories (not used yet)',
  `DISPNAMEEN` varchar(45) DEFAULT NULL,
  `DISPNAMEES` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`ID`)
);

--
-- Table structure for table `indexpage`
--

CREATE TABLE `indexpage` (
  `langId` char(12) NOT NULL DEFAULT 'en',
  `headline` varchar(254) DEFAULT NULL,
  `headlineBody` varchar(4500) DEFAULT NULL,
  `subheadlineOne` varchar(254) DEFAULT NULL,
  `subheadlineTwo` varchar(254) DEFAULT NULL,
  `pageBody` varchar(4500) DEFAULT NULL,
  `webPageHeader` varchar(254) DEFAULT NULL,
  `newsFeedHeader` varchar(254) DEFAULT NULL,
  `page` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`langId`)
);

--
-- Table structure for table `instruments`
--

CREATE TABLE `instruments` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Autoincrementing unique identifier for instruments',
  `INSTNAME` varchar(45) NOT NULL COMMENT 'Name of the Instrument as Stored in the database',
  `DISPNAME` varchar(45) NOT NULL COMMENT 'Display Name to be Used for Visual Components',
  `CATEGORY` varchar(45) DEFAULT NULL COMMENT 'Instrument category (not used yet)',
  `DISPNAMEEN` varchar(45) DEFAULT NULL,
  `DISPNAMEES` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`ID`)
);

--
-- Table structure for table `languages`
--

CREATE TABLE `languages` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Serialized Identifier for Uniqueness',
  `LANG` varchar(6) NOT NULL COMMENT 'Language identifier',
  `LANGUAGE` varchar(45) NOT NULL COMMENT 'Visible marker for Language in select Lists',
  `SYS` varchar(45) NOT NULL DEFAULT 'msbing' COMMENT 'System Used for Language Translation Services - msbing is Microsoft Bing and ggle is Google Translate',
  `DEFAULT` varchar(1) NOT NULL DEFAULT 'F',
  `LANGUAGEEN` varchar(45) DEFAULT NULL,
  `LANGUAGEES` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`ID`)
);

--
-- Table structure for table `likes`
--

CREATE TABLE `likes` (
  `memid` varchar(38) NOT NULL COMMENT 'Member GUID of the user that is liking the profile',
  `likeid` varchar(38) NOT NULL COMMENT 'profile ID of the liked profile',
  PRIMARY KEY (`memid`,`likeid`)
);

--
-- Table structure for table `member`
--

CREATE TABLE `member` (
  `memberguid` varchar(38) NOT NULL DEFAULT 'GUID' COMMENT 'Global Universal Identifier for Member Records',
  `MEMNAME` varchar(256) NOT NULL COMMENT 'Screen Name shown in Member Profile',
  `MEMPHONE` varchar(128) DEFAULT NULL COMMENT '<private> phone number for member contact if needed',
  `MEMEMAIL` varchar(2048) NOT NULL COMMENT '<private> email address for member contact if needed',
  `MEMAGE` int(3) NOT NULL COMMENT '<private> age of member to calculate school group and used in search ranges',
  `MEMGENDER` varchar(1) DEFAULT NULL COMMENT '<private>  member gender used in search parameters',
  `MEMLANG` varchar(6) DEFAULT 'en',
  `MEMLESSONS` varchar(2) NOT NULL COMMENT 'Lesson Types Provided by Member',
  `MEMCOUNTRY` int(3) DEFAULT NULL COMMENT '<private> Geographical area of Member used in searches',
  `MEMTWITTER` varchar(256) DEFAULT NULL COMMENT 'Member''s Twitter Account',
  `MEMFACEBOOK` varchar(256) DEFAULT NULL COMMENT 'Member''s Facebook Account',
  `MEMYOUTUBE` varchar(256) DEFAULT NULL COMMENT 'Member''s YouTube Account',
  `MEMLINKEDIN` varchar(256) DEFAULT NULL COMMENT 'Member''s LinkedIn Account',
  `MEMIGRAM` varchar(256) DEFAULT NULL COMMENT 'Member''s Instagram Account',
  `MEMVINE` varchar(256) DEFAULT NULL COMMENT 'Member''s Vine Account',
  `MEMHEADLINE` varchar(512) NOT NULL COMMENT 'Headline shown on Member Profile Page',
  `MEMBIO` varchar(12000) DEFAULT NULL COMMENT 'Bio shown on Member Profile Page',
  `memdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `MEM_PRV` char(1) DEFAULT 'Y' COMMENT 'Private or Public Profile...  true is private, false is public',
  `MEM_CHAT` char(1) DEFAULT 'Y',
  `MEM_GIFT` char(1) DEFAULT 'Y',
  `MEMBARCODE` varchar(45) DEFAULT 'BARCODE' COMMENT 'Code used by the bar to validate the redemption of drinks and or points',
  `MEMBARPIC` varchar(45) DEFAULT 'bar1' COMMENT 'Image used to validate the purchase ewas complete by a secure line to our server',
  `MEM_LOCK` char(1) NOT NULL DEFAULT 'N',
  `topevent` char(1) DEFAULT 'N',
  `EVTWEIGHT` int(3) DEFAULT '1',
  `VIS_NAME` varchar(256) NOT NULL,
  `MEM_THUMB` char(1) NOT NULL DEFAULT 'Y',
  `MEM_SCAT` varchar(45) NOT NULL DEFAULT '',
  `MEM_INSTA` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`memberguid`)
);
DELIMITER ;;
CREATE TRIGGER `member_BINS` BEFORE INSERT ON `member` FOR EACH ROW
-- Edit trigger body code below this line. Do not edit lines above this one
IF new.memberguid="GUID" then
   SET new.memberguid=UUID();
end if;;
DELIMITER ;

--
-- Table structure for table `member_chat`
--

CREATE TABLE `member_chat` (
  `id` varchar(38) NOT NULL COMMENT 'RockStar Member GUID',
  `chatmem` varchar(512) NOT NULL COMMENT 'Member Identifier for Tranzchat System',
  `chatlang` varchar(6) NOT NULL DEFAULT 'en' COMMENT 'Member''s preferred Chat language',
  `chat_ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
);

--
-- Table structure for table `member_cp`
--

CREATE TABLE `member_cp` (
  `cpix` int(11) NOT NULL AUTO_INCREMENT,
  `cp_type` varchar(6) NOT NULL,
  `cp_rmem` varchar(38) NOT NULL,
  `cp_action` varchar(5) NOT NULL,
  `value` int(11) NOT NULL,
  `cp_txts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ccxid` varchar(45) DEFAULT NULL,
  `tnxid` varchar(45) DEFAULT NULL,
  `cp_fmem` varchar(38) NOT NULL,
  `cp_desc` varchar(450) DEFAULT NULL,
  PRIMARY KEY (`cpix`)
);

--
-- Table structure for table `member_emails`
--

CREATE TABLE `member_emails` (
  `emailid` char(38) NOT NULL DEFAULT 'GUID',
  `to` varchar(45) DEFAULT NULL COMMENT 'GUID of the mailing list to use or member to email',
  `from` varchar(256) DEFAULT NULL COMMENT 'email address identified as the FROM email ',
  `subject` varchar(80) DEFAULT NULL,
  `body` varchar(21000) DEFAULT NULL,
  `emailts` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`emailid`)
);
DELIMITER ;;
CREATE TRIGGER `member_emails_BEFORE_INSERT` BEFORE INSERT ON `member_emails` FOR EACH ROW
BEGIN
IF new.emailid="GUID" then
   SET new.emailid=UUID();
end if;

END;;
DELIMITER ;

--
-- Table structure for table `member_events`
--

CREATE TABLE `member_events` (
  `mptxid` int(11) NOT NULL AUTO_INCREMENT,
  `payload` varchar(200) NOT NULL,
  `eventid` varchar(45) DEFAULT NULL,
  `profmem` varchar(45) NOT NULL,
  `mem_events` int(11) NOT NULL,
  `mptx_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ccxid` varchar(45) NOT NULL,
  `tnxid` varchar(45) NOT NULL,
  PRIMARY KEY (`mptxid`)
);

--
-- Table structure for table `member_forms`
--

CREATE TABLE `member_forms` (
  `formid` varchar(38) NOT NULL DEFAULT 'GUID',
  `memberid` varchar(38) NOT NULL,
  `formname` varchar(450) DEFAULT NULL,
  `formresp` varchar(4500) DEFAULT NULL,
  `formlang` varchar(6) DEFAULT 'en',
  `formdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`formid`)
);
DELIMITER ;;
CREATE TRIGGER `member_forms_BINS` BEFORE INSERT ON `member_forms` FOR EACH ROW
BEGIN
IF new.formid="GUID" then
   SET new.formid=UUID();
end if;

END;;
DELIMITER ;

--
-- Table structure for table `member_genres`
--

CREATE TABLE `member_genres` (
  `memguid` varchar(38) NOT NULL COMMENT 'reference to Member''s GUID',
  `genre_id` int(11) NOT NULL COMMENT 'Reference to the Genre Number',
  PRIMARY KEY (`memguid`,`genre_id`)
);

--
-- Table structure for table `member_groups`
--

CREATE TABLE `member_groups` (
  `memguid` varchar(38) NOT NULL COMMENT 'reference to Member''s GUID',
  `group_id` int(11) NOT NULL COMMENT 'Reference to the Group Number',
  PRIMARY KEY (`memguid`,`group_id`)
);

--
-- Table structure for table `member_instruments`
--

CREATE TABLE `member_instruments` (
  `memguid` varchar(38) NOT NULL COMMENT 'reference to Member''s GUID',
  `inst_id` int(11) NOT NULL COMMENT 'Reference to the Instrument Number',
  PRIMARY KEY (`memguid`,`inst_id`)
);

--
-- Table structure for table `member_lllangs`
--

CREATE TABLE `member_lllangs` (
  `memguid` varchar(38) NOT NULL COMMENT 'reference to Member''s GUID',
  `lang_id` int(11) NOT NULL COMMENT 'Reference to the Language Number',
  PRIMARY KEY (`memguid`,`lang_id`)
);

--
-- Table structure for table `member_mp3s`
--

CREATE TABLE `member_mp3s` (
  `memguid` varchar(38) NOT NULL COMMENT 'GUID of the member that has linked the mp3',
  `mp3url` varchar(45) NOT NULL DEFAULT '' COMMENT 'Link to the mp3 file',
  `mp3title` varchar(512) DEFAULT NULL COMMENT 'Title for mp3 to use in User Interface and to act as ALT text for accessibility features',
  `mp3thumburl` varchar(128) NOT NULL DEFAULT 'default' COMMENT 'Thumbnail Photo for mp3 (.jpg)',
  `mp3show` varchar(1) NOT NULL DEFAULT 'T',
  `mp3date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `mp3seq` bigint(32) NOT NULL AUTO_INCREMENT,
  `upmemguid` varchar(38) DEFAULT NULL COMMENT 'Member GUID of the uploader of the mp3',
  `mp3_points` varchar(45) DEFAULT NULL,
  `mp3_dollars` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`mp3seq`)
);

--
-- Table structure for table `member_payments`
--

CREATE TABLE `member_payments` (
  `mptxid` int(11) NOT NULL AUTO_INCREMENT,
  `mem_payload` varchar(200) NOT NULL,
  `tomem` varchar(45) NOT NULL,
  `frommem` varchar(45) NOT NULL,
  `payval` varchar(45) NOT NULL,
  `mptx_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ccxid` varchar(45) NOT NULL,
  `tnxid` varchar(45) NOT NULL,
  PRIMARY KEY (`mptxid`)
);

--
-- Table structure for table `member_pics`
--

CREATE TABLE `member_pics` (
  `memguid` varchar(38) NOT NULL COMMENT 'GUID of the member that has uploaded the picture',
  `picurl` varchar(128) NOT NULL COMMENT 'URL to the Picture file (essentially photoGUID.jpg)',
  `biopic` varchar(1) DEFAULT 'F' COMMENT 'Identifies the BIO picture for the profile',
  `pictitle` varchar(16384) DEFAULT NULL COMMENT 'Title for Picture to use in User Interface and to act as ALT text for accessibility features',
  `picthumburl` varchar(128) NOT NULL COMMENT 'Thumbnail Photo for Picture (Generally fileGUIDthumb.jpg)',
  `picshow` varchar(1) NOT NULL DEFAULT 'F',
  `picdate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `picseq` bigint(32) NOT NULL AUTO_INCREMENT,
  `upmemguid` varchar(38) DEFAULT NULL,
  `pic_points` varchar(45) DEFAULT NULL,
  `pic_dollars` varchar(45) DEFAULT NULL,
  `pic_shipping` varchar(45) DEFAULT NULL,
  `pic_taxable` varchar(5) NOT NULL DEFAULT 'yes',
  `pic_storeonly` varchar(5) NOT NULL DEFAULT 'no',
  `pic_quantity` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`picseq`)
);

--
-- Table structure for table `member_points`
--

CREATE TABLE `member_points` (
  `mptxid` int(11) NOT NULL AUTO_INCREMENT,
  `mem_payload` varchar(200) NOT NULL,
  `tomem` varchar(45) NOT NULL,
  `frommem` varchar(45) NOT NULL,
  `profmem` varchar(45) NOT NULL,
  `mem_points` int(11) NOT NULL,
  `mptx_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ccxid` varchar(45) NOT NULL,
  `tnxid` varchar(45) NOT NULL,
  PRIMARY KEY (`mptxid`)
);

--
-- Table structure for table `member_splangs`
--

CREATE TABLE `member_splangs` (
  `memguid` varchar(38) NOT NULL COMMENT 'reference to Member''s GUID',
  `lang_id` int(11) NOT NULL COMMENT 'Reference to the Language Number',
  PRIMARY KEY (`memguid`,`lang_id`)
);

--
-- Table structure for table `member_ytvids`
--

CREATE TABLE `member_ytvids` (
  `memguid` varchar(38) NOT NULL COMMENT 'GUID of the member that has linked the YouTube Video',
  `ytlink` varchar(45) NOT NULL DEFAULT '' COMMENT 'Link to the youtube file',
  `yttitle` varchar(512) DEFAULT NULL COMMENT 'Title for video to use in User Interface and to act as ALT text for accessibility features',
  `linktype` varchar(5) DEFAULT 'YTUBE',
  `vidthumburl` varchar(128) NOT NULL DEFAULT 'default' COMMENT 'Thumbnail Photo for Video (.jpg)',
  `vidshow` varchar(1) NOT NULL DEFAULT 'T',
  `viddate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `vidseq` bigint(32) NOT NULL AUTO_INCREMENT,
  `upmemguid` varchar(38) DEFAULT NULL COMMENT 'Member GUID of the uploader of the picture',
  `yt_points` varchar(45) DEFAULT NULL,
  `yt_dollars` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`vidseq`)
);

--
-- Table structure for table `newregmember`
--

CREATE TABLE `newregmember` (
  `id` varchar(38) NOT NULL DEFAULT '',
  `mem_login` varchar(45) NOT NULL DEFAULT '',
  `reg_key` varchar(256) NOT NULL DEFAULT '',
  `reg_hash` varchar(256) NOT NULL DEFAULT '',
  `reg_pass` varchar(256) NOT NULL DEFAULT '',
  `reg_rname` varchar(256) NOT NULL DEFAULT '',
  `reg_lang` varchar(6) NOT NULL DEFAULT '',
  `memphone` varchar(128) DEFAULT NULL,
  `memage` bigint(20) NOT NULL DEFAULT '0',
  `memgender` varchar(1) DEFAULT NULL,
  `memlessons` varchar(2) NOT NULL DEFAULT '',
  `memcountry` bigint(20) DEFAULT NULL
);

--
-- Table structure for table `news`
--

CREATE TABLE `news` (
  `newsguid` varchar(38) NOT NULL DEFAULT 'GUID' COMMENT 'Global Identifier for a News Article',
  `newsdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date the News Article was Created',
  `newstitle` varchar(45) NOT NULL COMMENT 'Title for the News Article',
  `newsdesc` varchar(512) NOT NULL COMMENT 'Short Description (second headline) for the news article',
  `newsimage` varchar(64) DEFAULT NULL COMMENT 'Photo (only one per article) for the News Article',
  `newsbody` mediumtext COMMENT 'Long HTML body of the News Article.  Should be cut and pasted in from an HTML editor until an embedded HTML editor can be created for this purpose.',
  `newstype` varchar(2) DEFAULT 'A',
  `imgtype` char(1) DEFAULT 'P',
  `memberguid` varchar(38) DEFAULT NULL,
  PRIMARY KEY (`newsguid`)
);
DELIMITER ;;
CREATE TRIGGER `news_BINS` BEFORE INSERT ON `news` FOR EACH ROW
-- Edit trigger body code below this line. Do not edit lines above this one

IF new.newsguid="GUID" then
   SET new.newsguid=UUID();
end if;;
DELIMITER ;

--
-- Table structure for table `parent_member`
--

CREATE TABLE `parent_member` (
  `parent_id` varchar(38) NOT NULL COMMENT 'Identifier of the partent Record',
  `child_id` varchar(38) NOT NULL COMMENT 'ID of the child Record',
  PRIMARY KEY (`parent_id`,`child_id`)
);

--
-- Table structure for table `paypal_ipn`
--

CREATE TABLE `paypal_ipn` (
  `CCXID` bigint(20) NOT NULL AUTO_INCREMENT,
  `logtime` varchar(45) DEFAULT NULL,
  `itemname` varchar(450) DEFAULT NULL,
  `itemnumber` varchar(45) DEFAULT NULL,
  `paymentstatus` varchar(45) DEFAULT NULL,
  `paymentamount` varchar(45) DEFAULT NULL,
  `paymentcurrency` varchar(45) DEFAULT NULL,
  `txnid` varchar(45) DEFAULT NULL,
  `receiveremail` varchar(45) DEFAULT NULL,
  `payeremail` varchar(45) DEFAULT NULL,
  `response` varchar(45) DEFAULT NULL,
  `requestparams` varchar(2048) DEFAULT NULL,
  `error` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`CCXID`)
);
DELIMITER ;;
CREATE TRIGGER `paypal_ipn_AINS` AFTER INSERT ON `paypal_ipn` FOR EACH ROW
-- Edit trigger body code below this line. Do not edit lines above this one
begin
IF NEW.itemnumber = "PM01DRIK" THEN
	insert into `pml`.`member_points` (`mem_payload`, `tomem`, `profmem`, `frommem`, `mem_points`, `ccxid`, `tnxid`) 
    values (
    NEW.`itemname`,
    substr(NEW.`itemname`,2,36), 
    substr(NEW.`itemname`,39,36), 
    substr(NEW.`itemname`,76,36), 
    15,
    NEW.`ccxid`, 
    NEW.`txnid`);
end if;
IF NEW.itemnumber = "PM02DRIK" THEN
	insert into `pml`.`member_points` (`mem_payload`, `tomem`, `profmem`, `frommem`, `mem_points`, `ccxid`, `tnxid`) 
    values (
    NEW.`itemname`,
    substr(NEW.`itemname`,2,36), 
    substr(NEW.`itemname`,39,36), 
    substr(NEW.`itemname`,76,36), 
    30,
    NEW.`ccxid`, 
    NEW.`txnid`);
end if;
IF NEW.itemnumber = "PM03DRIK" THEN
	insert into `pml`.`member_points` (`mem_payload`, `tomem`, `profmem`, `frommem`, `mem_points`, `ccxid`, `tnxid`) 
    values (
    NEW.`itemname`,
    substr(NEW.`itemname`,2,36), 
    substr(NEW.`itemname`,39,36), 
    substr(NEW.`itemname`,76,36), 
    45,
    NEW.`ccxid`, 
    NEW.`txnid`);
end if;
IF NEW.itemnumber = "PM01BTTL" THEN
	insert into `pml`.`member_points` (`mem_payload`, `tomem`, `profmem`, `frommem`, `mem_points`, `ccxid`, `tnxid`) 
    values (
    NEW.`itemname`,
    substr(NEW.`itemname`,2,36), 
    substr(NEW.`itemname`,39,36), 
    substr(NEW.`itemname`,76,36), 
    150,
    NEW.`ccxid`, 
    NEW.`txnid`);
end if;
IF NEW.itemnumber = "PSN01DRIK" THEN
	insert into `member_points` (`mem_payload`, `tomem`, `profmem`, `frommem`, `mem_points`, `ccxid`, `tnxid`) 
    values (
    NEW.`itemname`,
    substr(NEW.`itemname`,2,36), 
    substr(NEW.`itemname`,39,36), 
    substr(NEW.`itemname`,76,36), 
    15,
    NEW.`ccxid`, 
    NEW.`txnid`);
end if;
IF NEW.itemnumber = "PSN02DRIK" THEN
	insert into `member_points` (`mem_payload`, `tomem`, `profmem`, `frommem`, `mem_points`, `ccxid`, `tnxid`) 
    values (
    NEW.`itemname`,
    substr(NEW.`itemname`,2,36), 
    substr(NEW.`itemname`,39,36), 
    substr(NEW.`itemname`,76,36), 
    30,
    NEW.`ccxid`, 
    NEW.`txnid`);
end if;
IF NEW.itemnumber = "PSN03DRIK" THEN
	insert into `member_points` (`mem_payload`, `tomem`, `profmem`, `frommem`, `mem_points`, `ccxid`, `tnxid`) 
    values (
    NEW.`itemname`,
    substr(NEW.`itemname`,2,36), 
    substr(NEW.`itemname`,39,36), 
    substr(NEW.`itemname`,76,36), 
    45,
    NEW.`ccxid`, 
    NEW.`txnid`);
end if;
IF NEW.itemnumber = "PSN01BTTL" THEN
	insert into `member_points` (`mem_payload`, `tomem`, `profmem`, `frommem`, `mem_points`, `ccxid`, `tnxid`) 
    values (
    NEW.`itemname`,
    substr(NEW.`itemname`,2,36), 
    substr(NEW.`itemname`,39,36), 
    substr(NEW.`itemname`,76,36), 
    150,
    NEW.`ccxid`, 
    NEW.`txnid`);
end if;
END;;
DELIMITER ;

--
-- Table structure for table `piccomm`
--

CREATE TABLE `piccomm` (
  `PICCOMID` varchar(38) NOT NULL DEFAULT 'GUID' COMMENT 'Global Universal Identifier for Comment Records',
  `PICCOMURL` varchar(76) NOT NULL COMMENT 'Picture URL Comment is Attached To',
  `COMMNAME` varchar(256) NOT NULL COMMENT 'Screen Name shown in Member Profile',
  `COMMENT` varchar(2048) NOT NULL COMMENT 'Actual Comment Text (not UNICODE yet...)',
  `COMMDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date and time stamp of when comment was inserted into the database',
  PRIMARY KEY (`PICCOMID`)
);
DELIMITER ;;
CREATE TRIGGER `piccomm_BINS` BEFORE INSERT ON `piccomm` FOR EACH ROW
IF new.PICCOMID="GUID" then
 
   SET new.PICCOMID=UUID();

end if;;
DELIMITER ;

--
-- Table structure for table `quiz`
--

CREATE TABLE `quiz` (
  `quizid` int(11) NOT NULL AUTO_INCREMENT,
  `memname` varchar(450) DEFAULT NULL,
  `memphone` varchar(450) DEFAULT NULL,
  `response` varchar(450) DEFAULT NULL,
  `eventid` varchar(450) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`quizid`)
);

--
-- Table structure for table `reg_member`
--

CREATE TABLE `reg_member` (
  `id` varchar(38) NOT NULL DEFAULT 'GUID' COMMENT 'GUID identifying member uniquely within the database',
  `mem_login` varchar(45) NOT NULL COMMENT 'Unique login for each member',
  `reg_key` varchar(256) NOT NULL COMMENT 'key used to manage password cryptography',
  `reg_hash` varchar(256) NOT NULL COMMENT 'Hash value used together with key for password cryptography',
  `reg_pass` varchar(256) NOT NULL COMMENT 'Cryptographically stored password',
  `reg_rname` varchar(256) NOT NULL,
  `reg_lang` varchar(6) NOT NULL DEFAULT 'en',
  `reg_phone` varchar(128) DEFAULT NULL COMMENT '<private> phone number for member contact if needed',
  `reg_age` int(3) NOT NULL COMMENT '<private> age of member to calculate school group and used in search ranges',
  `reg_gender` varchar(1) DEFAULT NULL COMMENT '<private>  member gender used in search parameters',
  `reg_lessons` varchar(2) NOT NULL COMMENT 'Lesson Types Provided by Member',
  `reg_country` int(3) DEFAULT NULL COMMENT '<private> Geographical area of Member used in searches',
  `reg_code` varchar(45) NOT NULL DEFAULT 'nocode',
  `chatok` int(1) NOT NULL DEFAULT '1' COMMENT '0 is no chat, 1 is junior chat with parent paid and 2 is adult member chat',
  `tchatok` int(1) NOT NULL DEFAULT '1' COMMENT '0=not allowed, 1=allowed for translation chat',
  `reg_email` varchar(45) DEFAULT NULL,
  `emailpref` varchar(5) NOT NULL DEFAULT '00000',
  `reg_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `mem_pro` int(1) DEFAULT '0',
  `reg_scat` varchar(45) NOT NULL DEFAULT '',
  `mem_cartid` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mem_login_UNIQUE` (`mem_login`)
);
DELIMITER ;;
CREATE TRIGGER `reg_member_BINS` BEFORE INSERT ON `reg_member` FOR EACH ROW
IF new.id="GUID" then
   SET new.id=UUID();
end if;;
DELIMITER ;

--
-- Table structure for table `regcodes`
--

CREATE TABLE `regcodes` (
  `regcodeid` int(11) NOT NULL AUTO_INCREMENT,
  `regcode` varchar(45) DEFAULT NULL,
  `rctimestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`regcodeid`)
);

--
-- Table structure for table `registered_profiles`
--

CREATE TABLE `registered_profiles` (
  `mem_id` varchar(38) NOT NULL,
  `prof_id` varchar(38) NOT NULL DEFAULT '',
  `memprodate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`mem_id`,`prof_id`)
);

--
-- Table structure for table `rprofpage`
--

CREATE TABLE `rprofpage` (
  `langId` char(12) NOT NULL DEFAULT 'en',
  `regmemid` varchar(38) NOT NULL DEFAULT 'Default',
  `mainhead` varchar(45) DEFAULT NULL,
  `headline` varchar(4000) DEFAULT NULL,
  `headlinepic` varchar(45) DEFAULT NULL,
  `headlineBody` varchar(4000) DEFAULT NULL,
  `headlineBodypic` varchar(45) DEFAULT NULL,
  `subheadlineOne` varchar(4000) DEFAULT NULL,
  `subheadlineOnepic` varchar(45) DEFAULT NULL,
  `subheadlineTwo` varchar(4000) DEFAULT NULL,
  `subheadlineTwopic` varchar(45) DEFAULT NULL,
  `pageBody` varchar(4000) DEFAULT NULL,
  `pageBodypic` varchar(45) DEFAULT NULL,
  `webPageHeader` varchar(254) DEFAULT NULL,
  `newsFeedHeader` varchar(254) DEFAULT NULL,
  `page` varchar(45) DEFAULT 'index',
  `pagebanner` varchar(45) DEFAULT NULL,
  `bannertype` varchar(3) NOT NULL DEFAULT 'P',
  `tope` varchar(3) DEFAULT 'F',
  PRIMARY KEY (`langId`,`regmemid`)
);

--
-- Table structure for table `searchdiag`
--

CREATE TABLE `searchdiag` (
  `langid` char(6) NOT NULL DEFAULT 'en',
  `msearch` varchar(45) NOT NULL DEFAULT 'Search Members',
  `esearch` varchar(45) NOT NULL DEFAULT 'Search Events',
  `psearch` varchar(45) NOT NULL DEFAULT 'Search Products',
  `sbodypre` varchar(4500) DEFAULT NULL,
  `sbodypost` varchar(4500) DEFAULT NULL,
  PRIMARY KEY (`langid`)
);

--
-- Table structure for table `seeds`
--

CREATE TABLE `seeds` (
  `seed` int(11) DEFAULT NULL,
  `seed51` int(11) DEFAULT NULL,
  `seed22` int(11) DEFAULT NULL
);

--
-- Table structure for table `session`
--

CREATE TABLE `session` (
  `SESSID` varchar(38) NOT NULL DEFAULT 'NONE' COMMENT 'Unique Identifier for sessions allowing for multiples valid sessions for each user (maybe on multiple devices?).',
  `MEMBER` varchar(38) NOT NULL COMMENT 'member''s GUID',
  `SESSION` varchar(38) NOT NULL COMMENT 'Temporary session GUID used in client exchanges',
  `VALID` int(1) NOT NULL DEFAULT '1' COMMENT 'Allows for invalidation of member session pairs without deleting',
  `SESSIONTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Allows for timeput of session pairs',
  PRIMARY KEY (`SESSID`)
);
DELIMITER ;;
CREATE TRIGGER `session_BINS` BEFORE INSERT ON `session` FOR EACH ROW
SET new.sessid=UUID();;
DELIMITER ;


--
-- Table structure for table `srch_category`
--

CREATE TABLE `srch_category` (
  `catid` int(11) NOT NULL AUTO_INCREMENT,
  `catname` varchar(450) DEFAULT NULL,
  `catlang` varchar(6) DEFAULT 'en',
  PRIMARY KEY (`catid`)
);

--
-- Table structure for table `srchm_category`
--

CREATE TABLE `srchm_category` (
  `catid` int(11) NOT NULL AUTO_INCREMENT,
  `catname` varchar(450) NOT NULL,
  `catpname` varchar(45) NOT NULL,
  `catlang` varchar(6) NOT NULL DEFAULT 'en',
  `catmand` char(1) DEFAULT NULL,
  `catsearch` char(1) DEFAULT 'Y',
  PRIMARY KEY (`catid`)
);

--
-- Table structure for table `testimonials`
--

CREATE TABLE `testimonials` (
  `ttm_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Serializer - can be reordered if needed',
  `ttmname` varchar(256) NOT NULL COMMENT 'Testimonial Name',
  `ttmdesc` varchar(4096) NOT NULL COMMENT 'Testimonial Text Body',
  PRIMARY KEY (`ttm_id`)
);

--
-- data for table `countries`
--

ALTER TABLE `countries` DISABLE KEYS;
INSERT INTO `countries` VALUES (1,'Algeria','Al Jaza\'ir','Africa','F'),(2,'Morocco','Al Maghrib','Africa','F'),(3,'Angola','Angola','Africa','F'),(4,'Western Sahara','A&#7779;-&#7778;a&#7717;r&#257;&#8217; al-Gharb&#299;yah','Africa','F'),(5,'Sudan','As-Sudan','Africa','F'),(6,'Burundi','Burundi','Africa','F'),(7,'Cameroon','Cameroon','Africa','F'),(8,'Comoros','Comores','Africa','F'),(9,'Djibouti','Djibouti','Africa','F'),(10,'Gabon','Gabon','Africa','F'),(11,'Equatorial Guinea','Guinea Ecuatorial','Africa','F'),(12,'Eritrea','Hagere Ertra','Africa','F'),(13,'Reunion Island','Ile de la Réunion','Africa','F'),(14,'Ethiopia','Ityop\'iya','Africa','F'),(15,'United Republic of Tanzania','Jamhuri ya Muungano wa Tanzania','Africa','F'),(16,'Kenya','Kenya','Africa','F'),(17,'Libya','Libiyah','Africa','F'),(18,'Madagascar','Madagascar','Africa','F'),(19,'Malawi','Malawi','Africa','F'),(20,'Mauritius','Mauritius','Africa','F'),(21,'Mayotte','Mayotte','Africa','F'),(22,'Egypt','Misr','Africa','F'),(23,'Mozambique','Mocambique','Africa','F'),(24,'Central African Republic','Republique Centrafricaine','Africa','F'),(25,'Democratic Republic of the Congo (Kinshasa)','République Démocratique du Congo','Africa','F'),(26,'Congo, Republic of(Brazzaville)','République du Congo','Africa','F'),(27,'Rwanda','Rwanda','Africa','F'),(28,'Sao Tome and Principe','Sao Tome e Principe','Africa','F'),(29,'Seychelles','Seychelles','Africa','F'),(30,'Somalia','Somalia','Africa','F'),(31,'South Sudan','South Sudan','Africa','F'),(32,'Chad','Tchad','Africa','F'),(33,'Tunisia','Tunis','Africa','F'),(34,'Uganda','Uganda','Africa','F'),(35,'Zambia','Zambia','Africa','F'),(36,'Zimbabwe','Zimbabwe','Africa','F'),(37,'Antarctica','Antarctica','Antarctica','F'),(38,'Afghanistan','Afghanestan','Asia','F'),(39,'Bangladesh','Bangladesh','Asia','F'),(40,'India','Bharat','Asia','F'),(41,'Bhutan','Bhutan','Asia','F'),(42,'Tibet','Bod','Asia','F'),(43,'Christmas Island','Christmas Island','Asia','F'),(44,'Cocos (Keeling) Islands','Cocos (Keeling) Islands','Asia','F'),(45,'Maldives','Dhivehi Raajje','Asia','F'),(46,'Armenia','Hayastan','Asia','F'),(47,'Iran (Islamic Republic of)','Iran','Asia','F'),(48,'Cambodia','Kampuchea','Asia','F'),(49,'Lao, People\'s Democratic Republic','Lao','Asia','F'),(50,'Malaysia','Malaysia','Asia','F'),(51,'Myanmar, Burma','Myanma Naingngandaw','Asia','F'),(52,'Brunei Darussalam','Negara Brunei Darussalam','Asia','F'),(53,'Nepal','Nepal','Asia','F'),(54,'Pakistan','Pakistan','Asia','F'),(55,'Philippines','Pilipinas','Asia','F'),(56,'Thailand','Prathet Thai','Asia','F'),(57,'Georgia','Sak\'art\'velo','Asia','F'),(58,'Singapore','Singapore','Asia','F'),(59,'Sri Lanka','Sri Lanka','Asia','F'),(60,'East Timor (Timor-Leste)','Timor','Asia','F'),(61,'Vietnam','Viet Nam','Asia','F'),(62,'Australia','Australia','Australia/New Zealand','F'),(63,'New Zealand','New Zealand/Aotearoa','Australia/New Zealand','F'),(64,'Tokelau','Tokelau','Australia/New Zealand','F'),(65,'Anguilla','Anguilla','Caribbean','F'),(66,'Antigua and Barbuda','Antigua and Barbuda','Caribbean','F'),(67,'Aruba','Aruba','Caribbean','F'),(68,'Bahamas','Bahamas','Caribbean','F'),(69,'Barbados','Barbados','Caribbean','F'),(70,'Cayman Islands','Cayman Islands','Caribbean','F'),(71,'Cuba','Cuba','Caribbean','F'),(72,'Dominica','Dominica','Caribbean','F'),(73,'Dominican Republic','Dominicana, Republica','Caribbean','F'),(74,'Grenada','Grenada','Caribbean','F'),(75,'Guadeloupe','Guadeloupe','Caribbean','F'),(76,'Haiti','Haiti','Caribbean','F'),(77,'Jamaica','Jamaica','Caribbean','F'),(78,'Martinique','Martinique','Caribbean','F'),(79,'Montserrat','Montserrat','Caribbean','F'),(80,'Netherlands Antilles','Nederlandse Antillen','Caribbean','F'),(81,'Puerto Rico','Puerto Rico','Caribbean','F'),(82,'Saint Lucia','Saint Lucia','Caribbean','F'),(83,'Turks and Caicos Islands','Turks and Caicos Islands','Caribbean','F'),(84,'Virgin Islands (U.S.)','Virgin Islands','Caribbean','F'),(85,'Saint Kitts and Nevis','Saint Kitts and Nevis','Caribbean','F'),(86,'Saint Vincent and the Grenadines','Saint Vincent and the Grenadines','Caribbean','F'),(87,'Virgin Islands (British)','Virgin Islands (British)','Caribbean','F'),(88,'Belize','Belize','Central America','F'),(89,'Costa Rica','Costa Rica','Central America','F'),(90,'El Salvador','El Salvador','Central America','F'),(91,'Guatemala','Guatemala','Central America','F'),(92,'Honduras','Honduras','Central America','F'),(93,'Nicaragua','Nicaragua','Central America','F'),(94,'Panama','Panama','Central America','F'),(95,'Tajikistan','Jumhurii Tojikiston','Central Asia','F'),(96,'Kyrgyzstan','Kyrgyz Respublikasy','Central Asia','F'),(97,'Kazakhstan','Qazaqstan','Central Asia','F'),(98,'Turkmenistan','Turkmenistan','Central Asia','F'),(99,'Uzbekistan','Uzbekiston Respublikasi','Central Asia','F'),(100,'Macau','Aomen','Eastern Asia','F'),(101,'Korea, Democratic People\'s Rep. (North Korea)','Choson','Eastern Asia','F'),(102,'Korea, Republic of (South Korea)','Han-guk','Eastern Asia','F'),(103,'Mongolia','Mongol Uls','Eastern Asia','F'),(104,'Japan','Nippon','Eastern Asia','F'),(105,'Taiwan (Republic of China)','T\'ai-wan','Eastern Asia','F'),(106,'Hong Kong','Xianggang','Eastern Asia','F'),(107,'China','Zhong Guo','Eastern Asia','F'),(108,'Bulgaria','Bulgaria','Eastern Europe','F'),(109,'Belarus','Byelarus','Eastern Europe','F'),(110,'Czech Republic','&#269;esk&#225; Republika','Eastern Europe','F'),(111,'Hungary','Magyarorszag','Eastern Europe','F'),(112,'Moldova, Republic of','Moldova','Eastern Europe','F'),(113,'Poland','Polska','Eastern Europe','F'),(114,'Romania','Rom&#226;nia','Eastern Europe','F'),(115,'Russian Federation','&#1056;&#1086;&#1089;&#1089;&#1080;&#1103;','Eastern Europe','F'),(116,'Slovakia (Slovak Republic)','Slovensko','Eastern Europe','F'),(117,'Ukraine','&#1059;&#1082;&#1088;&#1072;&#1111;&#1085;&#1072;','Eastern Europe','F'),(118,'Kosovo','Albanian: : Kosova ou Kosovë, ','Europe','F'),(119,'Andorra','Andorra','Europe','F'),(120,'Belgium','Belgique/Belgie','Europe','F'),(121,'Bosnia and Herzegovina','Bosna i Hercegovina','Europe','F'),(122,'Montenegro','Crna Gora','Europe','F'),(123,'Denmark','Danmark','Europe','F'),(124,'Germany','Deutschland','Europe','F'),(125,'Estonia','Eesti Vabariik','Europe','F'),(126,'Ireland','Éire','Europe','F'),(127,'Greece','Ellas or Ellada','Europe','F'),(128,'Spain','España','Europe','F'),(129,'Faroe Islands','Foroyar','Europe','F'),(130,'France','France','Europe','F'),(131,'Gibraltar','Gibraltar','Europe','F'),(132,'Great Britain','Great Britain','Europe','F'),(133,'Croatia','Hrvatska','Europe','F'),(134,'Italy','Italia','Europe','F'),(135,'Slovenia','Slovenia','Europe','F'),(136,'Latvia','Latvija','Europe','F'),(137,'Liechtenstein','Liechtenstein','Europe','F'),(138,'Lithuania','Lietuva','Europe','F'),(139,'Luxembourg','Luxembourg, Letzebuerg','Europe','F'),(140,'Iceland','Lyoveldio Island','Europe','F'),(141,'Macedonia, Rep. of','Makedonija','Europe','F'),(142,'Malta','Malta','Europe','F'),(143,'Monaco','Monaco','Europe','F'),(144,'Netherlands','Nederland/Holland','Europe','F'),(145,'Norway','Norge','Europe','F'),(146,'Austria','Österreich','Europe','F'),(147,'Portugal','Portugal','Europe','F'),(148,'San Marino','San Marino','Europe','F'),(149,'Switzerland','Schweiz/Suisse/Svizzera','Europe','F'),(150,'Albania','Shqiperia','Europe','F'),(151,'Serbia','Srbija','Europe','F'),(152,'Holy See','Status Civitatis Vaticanæ','Europe','F'),(153,'Vatican City State (Holy See)','Status Civitatis Vaticanæ','Europe','F'),(154,'Finland','Suomen Tasavalta','Europe','F'),(155,'Sweden','Sverige','Europe','F'),(156,'Turkey','Turkiye','Europe','F'),(157,'United Kingdom','United Kingdom','Europe','F'),(158,'Indonesia','Indonesia','Asia','F'),(159,'Timor-Leste (East Timor)','Timor','Asia','F'),(160,'Cyprus','Kibris, Kypros','Asia','F'),(161,'Saudi Arabia','Al Arabiyah as Suudiyah','Middle East','F'),(162,'Bahrain','Al Bahrayn','Middle East','F'),(163,'United Arab Emirates','Al Imarat al Arabiyah al Muttahidah','Middle East','F'),(164,'Kuwait','Al Kuwayt','Middle East','F'),(165,'Jordan','Al Urdun','Middle East','F'),(166,'Yemen','Al Yaman','Middle East','F'),(167,'Qatar','Dawlat Qatar','Middle East','F'),(168,'Palestinian territories','Filastin','Middle East','F'),(169,'Iraq','Iraq','Middle East','F'),(170,'Lebanon','Lubnan','Middle East','F'),(171,'Oman','Saltanat Uman','Middle East','F'),(172,'Syria, Syrian Arab Republic','Suriyah','Middle East','F'),(173,'Israel','Yisra\'el','Middle East','F'),(174,'Bermuda','Bermuda','North America','F'),(175,'Canada','Canada','North America','F'),(176,'Mexico','Estados Unidos Mexicanos','North America','F'),(177,'Greenland','Kalaallit Nunaat','North America','F'),(178,'United States','United States','North America','T'),(179,'French Guiana','Guyane','South America','F'),(180,'Venezuela','Venezuela','South America','F'),(181,'Trinidad and Tobago','Trinidad, Tobago','South America','F'),(182,'Palau','Belau','Oceania','F'),(183,'Fiji','Fiji','Oceania','F'),(184,'Guam','Guam','Oceania','F'),(185,'Kiribati','Kiribati, Kiribas','Oceania','F'),(186,'Marshall Islands','Marshall Islands','Oceania','F'),(187,'Micronesia, Federal States of','Micronesia','Oceania','F'),(188,'Nauru','Nauru','Oceania','F'),(189,'Northern Mariana Islands','Northern Mariana Islands','Oceania','F'),(190,'New Caledonia','Nouvelle-Calédonie','Oceania','F'),(191,'Papua New Guinea','Papua Niu Gini','Oceania','F'),(192,'Solomon Islands','Solomon Islands','Oceania','F'),(193,'Vanuatu','Vanuatu','Oceania','F'),(194,'American Samoa','American Samoa','Polynesia','F'),(195,'Cook Islands','Cook Islands','Polynesia','F'),(196,'Niue','Niue','Polynesia','F'),(197,'Pitcairn Island','Pitcairn Island','Polynesia','F'),(198,'French Polynesia','Polynésie Française','Polynesia','F'),(199,'Samoa','Samoa','Polynesia','F'),(200,'Tonga','Tonga','Polynesia','F'),(201,'Tuvalu','Tuvalu','Polynesia','F'),(202,'Wallis and Futuna Islands','Wallis et Futuna','Polynesia','F'),(203,'Argentina','Argentina','South America','F'),(204,'Bolivia','Bolivia','South America','F'),(205,'Brazil','Brasil','South America','F'),(206,'Chile','Chile','South America','F'),(207,'Colombia','Colombia','South America','F'),(208,'Ecuador','Ecuador','South America','F'),(209,'Guyana','Guyana','South America','F'),(210,'Falkland Islands','Islas Malvinas','South America','F'),(211,'Paraguay','Paraguay','South America','F'),(212,'Peru','Peru','South America','F'),(213,'Uruguay','Republica Oriental del Uruguay','South America','F'),(214,'Suriname','Suriname','South America','F'),(215,'French Southern Territories','Terres Australes et Antarctiques Françaises','South America','F'),(216,'Botswana','Botswana','Africa','F'),(217,'Lesotho','Lesotho','Africa','F'),(218,'Namibia','Namibia','Africa','F'),(219,'South Africa','South Africa','Africa','F'),(220,'Swaziland','Swaziland','Africa','F'),(221,'Benin','Benin','Africa','F'),(222,'Burkina Faso','Burkina Faso','Africa','F'),(223,'Cape Verde','Cabo Verde','Africa','F'),(224,'Ivory Coast','Cote d\'Ivoire','Africa','F'),(225,'Ghana','Ghana','Africa','F'),(226,'Guinea-Bissau','Guine-Bissau','Africa','F'),(227,'Guinea','Guinee','Africa','F'),(228,'Liberia','Liberia','Africa','F'),(229,'Mali','Mali','Africa','F'),(230,'Mauritania','Muritaniyah','Africa','F'),(231,'Niger','Niger','Africa','F'),(232,'Nigeria','Nigeria','Africa','F'),(233,'Togo','Republique Togolaise','Africa','F'),(234,'Senegal','Senegal','Africa','F'),(235,'Sierra Leone','Sierra Leone','Africa','F'),(236,'Gambia','The Gambia','Africa','F'),(237,'Azerbaijan','Azarbaycan','Asia','F'),(238,'Serbia','Serbian: Kosovo, &#1050;&#1086;&#1089;&#1086;&#1074;&#1086;','Eastern Europe','F');
ALTER TABLE `countries` ENABLE KEYS;

--
-- data for table `genres`
--

ALTER TABLE `genres` DISABLE KEYS;
INSERT INTO `genres` VALUES (1,'Alternative','Alternative Music',NULL,'Alternative Music','M&uacute;sica alternativa'),(2,'Blues','Blues',NULL,'Blues','Blues'),(3,'Classical','Classical Music',NULL,'Classical Music','M&uacute;sica Cl&aacute;sica'),(4,'Country','Country Music',NULL,'Country Music','Country Music'),(5,'Dance','Dance Music',NULL,'Dance Music','Dance Music'),(6,'Easy','Easy Listening',NULL,'Easy Listening','Easy Listening'),(7,'Electronic','Electronic Music',NULL,'Electronic Music','M&uacute;sica electr&oacute;nica'),(8,'European','European Music (Folk / Pop)',NULL,'European Music (Folk / Pop)','M&uacute;sica Europea (Folk o pop)'),(9,'Rap','Hip Hop / Rap',NULL,'Hip Hop / Rap','Hip Hop y Rap'),(10,'IndiePop','Indie Pop',NULL,'Indie Pop','Indie Pop'),(11,'Inspirational/Gospel','Inspirational (incl. Gospel)',NULL,'Inspirational (incl. Gospel)','Inspirado (Evangelio)'),(12,'AsianPop','Asian Pop (J-Pop, K-pop)',NULL,'Asian Pop (J-Pop, K-pop)','Pop Asi&aacute;tico (J-Pop, K-pop)'),(13,'Jazz','Jazz',NULL,'Jazz','Jazz'),(14,'Latin','Latin Music',NULL,'Latin Music','M&uacute;sica Latina'),(15,'NewAge','New Age',NULL,'New Age','Nueva Era'),(16,'Opera','Opera',NULL,'Opera','Opera'),(17,'Pop','Pop (Popular music)',NULL,'Pop (Popular music)','Pop (m&uacute;sica popular)'),(18,'R&B/Soul','R&B / Soul',NULL,'R&B / Soul','R &amp; B / Soul'),(19,'Reggae','Reggae',NULL,'Reggae','Reggae'),(20,'Rock','Rock',NULL,'Rock','Roca'),(21,'Singer/Songwriter','Singer / Songwriter (inc; Folk)',NULL,'Singer / Songwriter (inc; Folk)','Cantante / Compositor (Folk)'),(22,'World MusiC','World Music / Beats',NULL,'World Music / Beats','M&uacute;sica del mundo');
ALTER TABLE `genres` ENABLE KEYS;

--
-- data for table `grouptypes`
--

ALTER TABLE `grouptypes` DISABLE KEYS;
INSERT INTO `grouptypes` VALUES (1,'concert','Concert Band',NULL,'Concert Band','Banda de Conciertos'),(2,'solo','Solo Artist',NULL,'Solo Artist','Solista'),(3,'jazz','Jazz Band',NULL,'Jazz Band','Jazz Band'),(4,'orchestra','Orchestra',NULL,'Orchestra','Orquestra'),(5,'chorus','Chorus',NULL,'Chorus','Coro'),(6,'theatre','Theatre',NULL,'Theatre','Teatro'),(7,'garage','Garage Band',NULL,'Garage Band','Banda Garaje');
ALTER TABLE `grouptypes` ENABLE KEYS;


--
-- data for table `instruments`
--

ALTER TABLE `instruments` DISABLE KEYS;
INSERT INTO `instruments` VALUES (1,'Bagpipes','Bagpipes',NULL,'Bagpipes','Gaita'),(2,'Banjo','Banjo',NULL,'Banjo','Banjo'),(3,'Bass drum','Bass drum',NULL,'Bass drum','Bombo'),(4,'Bassoon','Bassoon',NULL,'Bassoon','Fagot'),(5,'Bell','Bell',NULL,'Bell','Campana'),(6,'Bongo','Bongo',NULL,'Bongo','Bongo'),(7,'Castanets','Castanets',NULL,'Castanets','Casta&ntilde;uelas'),(8,'Cello','Cello',NULL,'Cello','Violonchelo'),(9,'Clarinet','Clarinet',NULL,'Clarinet','Clarinete'),(10,'Clavichord','Clavichord',NULL,'Clavichord','Clavicordio'),(11,'Conga drum','Conga drum',NULL,'Conga drum','Congas'),(12,'Contrabassoon','Contrabassoon',NULL,'Contrabassoon','Contrafagot'),(13,'Cornet','Cornet',NULL,'Cornet','Corneta'),(14,'Cymbals','Cymbals',NULL,'Cymbals','Platillos'),(15,'Double bass','Double bass',NULL,'Double bass','Contrabajo'),(16,'Dulcian','Dulcian',NULL,'Dulcian','Dulcian'),(17,'Dynamophone','Dynamophone',NULL,'Dynamophone','Dynamophone'),(18,'Flute','Flute',NULL,'Flute','Flauta'),(19,'Flutophone','Flutophone',NULL,'Flutophone','Flutophone'),(20,'Glockenspiel','Glockenspiel',NULL,'Glockenspiel','Glockenspiel'),(21,'Gongs','Gongs',NULL,'Gongs','Gongs'),(22,'Guitar','Guitar',NULL,'Guitar','Guitarra'),(23,'Harmonica','Harmonica',NULL,'Harmonica','Harm&oacute;nica'),(24,'Harp','Harp',NULL,'Harp','Arpa'),(25,'Harpsichord','Harpsichord',NULL,'Harpsichord','Clavic&eacute;mbalo'),(26,'Lute','Lute',NULL,'Lute','La&uacute;d'),(27,'Mandolin','Mandolin',NULL,'Mandolin','Mandolina'),(28,'Maracas','Maracas',NULL,'Maracas','Maracas'),(29,'Metallophone','Metallophone',NULL,'Metallophone','Metallophone'),(30,'Musical box','Musical box',NULL,'Musical box','Caja de m&uacute;sica'),(31,'Oboe','Oboe',NULL,'Oboe','Oboe'),(32,'Ondes-Martenot','Ondes-Martenot',NULL,'Ondes-Martenot','Ondes martenot'),(33,'Piano','Piano',NULL,'Piano','Piano'),(34,'Recorder','Recorder',NULL,'Recorder','Grabadora'),(35,'Saxophone','Saxophone',NULL,'Saxophone','Sax&oacute;fono'),(36,'Shawm','Shawm',NULL,'Shawm','Caramillo'),(37,'Snare drum','Snare drum',NULL,'Snare drum','Tambor militar peque&ntilde;o'),(38,'Spider Bridge Resonator Guitar','Spider Bridge Resonator Guitar',NULL,'Spider Bridge Resonator Guitar','Ara&ntilde;a puente resonador guitarra'),(39,'Steel drum','Steel drum',NULL,'Steel drum','Tambor de acero'),(40,'Tambourine','Tambourine',NULL,'Tambourine','Tambourine'),(41,'Theremin','Theremin',NULL,'Theremin','Theremin'),(42,'Triangle','Triangle',NULL,'Triangle','Tri&aacute;ngulo'),(43,'Trombone','Trombone',NULL,'Trombone','Tromb&oacute;n'),(44,'Trumpet','Trumpet',NULL,'Trumpet','Trompeta'),(45,'Tuba','Tuba',NULL,'Tuba','Tuba'),(46,'Ukulele','Ukulele',NULL,'Ukulele','Ukulele'),(47,'Viola','Viola',NULL,'Viola','Viola'),(48,'Violin','Violin',NULL,'Violin','Viol&iacute;n'),(49,'Xylophone','Xylophone',NULL,'Xylophone','Xil&oacute;fono'),(50,'Zither','Zither',NULL,'Zither','C&iacute;tara'),(51,'Bass Guitar','Bass Guitar',NULL,'Bass Guitar','Bajo el&eacute;ctrico');
ALTER TABLE `instruments` ENABLE KEYS;

--
-- data for table `languages`
--

ALTER TABLE `languages` DISABLE KEYS;
INSERT INTO `languages` VALUES (1,'ar','Arabic','msbing','F','Arabic','Arabe'),(2,'bg','Bulgarian','msbing','F','Bulgarian','B&uacute;lgariano'),(3,'ca','Catalan','msbing','F','Catalan','Catal&aacute;n'),(4,'zh-CHS','Chinese Simplified','msbing','F','Chinese Simplified','Chino simple'),(5,'zh-CHT','Chinese Traditional','msbing','F','Chinese Traditional','Chino tradicional'),(6,'cs','Czech','msbing','F','Czech','Czecho'),(7,'da','Danish','msbing','F','Danish','Danish'),(8,'nl','Dutch','msbing','F','Dutch','Dutch'),(9,'en','English','msbing','T','English','Ingles'),(10,'et','Estonian','msbing','F','Estonian','Asteniano'),(11,'fi','Finnish','msbing','F','Finnish','Finnish'),(12,'fr','French','msbing','F','French','Franc&eacute;s'),(13,'gl','Galician','msbing','F','Galician','Galiano'),(14,'de','German','msbing','F','German','Aleman'),(15,'el','Greek','msbing','F','Greek','Griego'),(16,'ht','Haitian Creole','msbing','F','Haitian Creole','Haitiano Criollo'),(17,'he','Hebrew','msbing','F','Hebrew','Hebreo'),(18,'hi','Hindi','msbing','F','Hindi','Hind&uacute;'),(19,'hu','Hungarian','msbing','F','Hungarian','Hungariano'),(20,'id','Indonesian','msbing','F','Indonesian','Indonesian'),(21,'it','Italian','msbing','F','Italian','Italiano'),(22,'ja','Japanese','msbing','F','Japanese','Japon&eacute;s'),(23,'ko','Korean','msbing','F','Korean','Koreano'),(24,'lv','Latvian','msbing','F','Latvian','Latvian'),(25,'lt','Lithuanian','msbing','F','Lithuanian','Lithuanian'),(26,'ms','Malay','msbing','F','Malay','Malay'),(27,'mww','Hmong Daw','msbing','F','Hmong Daw','Hmong Daw'),(28,'no','Norwegian','msbing','F','Norwegian','Noriegian'),(29,'fa','Persian','msbing','F','Persian','Persiano'),(30,'pl','Polish','msbing','F','Polish','Poloniano'),(31,'pt','Portuguese','msbing','F','Portuguese','Portugu&eacute;s'),(32,'ro','Romanian','msbing','F','Romanian','Romano'),(33,'ru','Russian','msbing','F','Russian','Ruso'),(34,'sk','Slovak','msbing','F','Slovak','Eslovakiano'),(35,'sl','Slovenian','msbing','F','Slovenian','Eslovaniano'),(36,'es','Spanish','msbing','F','Spanish','Espanol'),(37,'sv','Swedish','msbing','F','Swedish','Suizo'),(38,'th','Thai','msbing','F','Thai','Thailandes'),(39,'tr','Turkish','msbing','F','Turkish','Turko'),(40,'uk','Ukrainian','msbing','F','Ukrainian','Ucraniano'),(41,'ur','Urdu','msbing','F','Urdu','Urduniano'),(42,'vi','Vietnamese','msbing','F','Vietnamese','Vietnamese');
ALTER TABLE `languages` ENABLE KEYS;


--
-- create view `memfinder`
--

CREATE VIEW `memfinder` AS
    SELECT 
        `a`.`memberguid` AS `memberguid`,
        `a`.`MEMNAME` AS `memname`,
        `a`.`MEMGENDER` AS `gender`,
        `a`.`MEMBIO` AS `membio`,
        `a`.`MEMHEADLINE` AS `memheadline`,
        `b`.`picurl` AS `picurl`,
        `b`.`picthumburl` AS `picthumburl`,
        `b`.`pictitle` AS `pictitle`,
        REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(CONCAT(' ',
                                                                                                        `a`.`MEMNAME`,
                                                                                                        ' ',
                                                                                                        `a`.`MEMAGE`,
                                                                                                        ' ',
                                                                                                        IF((`a`.`MEMGENDER` = '0'),
                                                                                                            'boy male guy dude',
                                                                                                            'girl female lady chick'),
                                                                                                        ' ',
                                                                                                        `a`.`MEMLANG`,
                                                                                                        ' ',
                                                                                                        `a`.`MEMLESSONS`,
                                                                                                        ' ',
                                                                                                        IF((`a`.`MEMLESSONS` = 'pv'),
                                                                                                            'private lessons',
                                                                                                            IF((`a`.`MEMLESSONS` = 'gp'),
                                                                                                                'group lessons',
                                                                                                                IF((`a`.`MEMLESSONS` = 'bo'),
                                                                                                                    'group private lessons',
                                                                                                                    ''))),
                                                                                                        ' ',
                                                                                                        `a`.`MEMCOUNTRY`,
                                                                                                        ' ',
                                                                                                        IF((`a`.`MEMTWITTER` IS NOT NULL),
                                                                                                            `a`.`MEMTWITTER`,
                                                                                                            ''),
                                                                                                        ' ',
                                                                                                        IF((`a`.`MEMFACEBOOK` IS NOT NULL),
                                                                                                            `a`.`MEMFACEBOOK`,
                                                                                                            ''),
                                                                                                        ' ',
                                                                                                        IF((`a`.`MEMYOUTUBE` IS NOT NULL),
                                                                                                            `a`.`MEMYOUTUBE`,
                                                                                                            ''),
                                                                                                        ' ',
                                                                                                        IF((`a`.`MEMLINKEDIN` IS NOT NULL),
                                                                                                            `a`.`MEMLINKEDIN`,
                                                                                                            ''),
                                                                                                        ' ',
                                                                                                        IF((`a`.`MEMIGRAM` IS NOT NULL),
                                                                                                            `a`.`MEMIGRAM`,
                                                                                                            ''),
                                                                                                        ' ',
                                                                                                        IF((`a`.`MEMVINE` IS NOT NULL),
                                                                                                            `a`.`MEMVINE`,
                                                                                                            ''),
                                                                                                        ' ',
                                                                                                        IF((`a`.`MEMHEADLINE` IS NOT NULL),
                                                                                                            `a`.`MEMHEADLINE`,
                                                                                                            ''),
                                                                                                        ' ',
                                                                                                        IF((`a`.`MEMBIO` IS NOT NULL),
                                                                                                            `a`.`MEMBIO`,
                                                                                                            ''),
                                                                                                        ' '),
                                                                                                '.',
                                                                                                ' '),
                                                                                            ',',
                                                                                            ' '),
                                                                                        '! ',
                                                                                        ' '),
                                                                                    '&',
                                                                                    ' '),
                                                                                '(',
                                                                                ' '),
                                                                            ') ',
                                                                            ' '),
                                                                        '-',
                                                                        ' '),
                                                                    '_',
                                                                    ' '),
                                                                '[',
                                                                ' '),
                                                            ']',
                                                            ' '),
                                                        '\'',
                                                        ' '),
                                                    ' ',
                                                    ' '),
                                                ':',
                                                ' '),
                                            '“',
                                            ' '),
                                        '”',
                                        ' '),
                                    '"',
                                    ' '),
                                ',',
                                ' '),
                            '.',
                            ' '),
                        '<',
                        ' '),
                    '>',
                    ' '),
                '/',
                ' '),
            '?',
            ' ') AS `memvals`
    FROM
        (`member` `a`
        LEFT JOIN `member_pics` `b` ON (((`a`.`memberguid` = `b`.`memguid`)
            AND (`b`.`biopic` = 'T'))))
    WHERE
        (`a`.`MEM_PRV` <> 'Y');
      


--
-- Final view structure for view `prodfinder`
--

CREATE VIEW `chatlog` AS 
select `t`.`MESSAGEID` AS `msig`,`c`.`mem_login` AS `email`,`a`.`chatmem` AS `chatmem`,`t`.`MMEM` AS `mmem`,`t`.`MESSAGE` AS `message`,`t`.`TRANS` AS `trans`,'snd' AS `snd`,`t`.`TSTMP` AS `timestamp` 
from (((`member_chat` `a` join `parent_member` `b`) join `reg_member` `c`) join `transchat`.`message` `t`) 
where ((`a`.`id` = `b`.`child_id`) and (`b`.`parent_id` = `c`.`id`) and (`t`.`MEMBER` = convert(`a`.`chatmem` using utf8))) 
union select `t`.`MESSAGEID` AS `msig`,`c`.`mem_login` AS `email`,`a`.`chatmem` AS `chatmem`,`t`.`MEMBER` AS `mmem`,`t`.`MESSAGE` AS `message`,`t`.`TRANS` AS `trans`,'rec' AS `rec`,`t`.`TSTMP` AS `timestamp` 
from (((`member_chat` `a` join `parent_member` `b`) join `reg_member` `c`) join `transchat`.`message` `t`) 
where ((`a`.`id` = `b`.`child_id`) and (`b`.`parent_id` = `c`.`id`) and (`t`.`MMEM` = convert(`a`.`chatmem` using utf8))) 
order by `email`,`chatmem`,`mmem`,`msig`;

--
-- Final view structure for view `prodfinder`
--

CREATE VIEW `prodfinder` AS 
select `a`.`memguid` AS `memguid`,`a`.`picurl` AS `picurl`,`a`.`pictitle` AS `pictitle`,concat(`a`.`picseq`,' ',`a`.`pictitle`) AS `picstext`,`a`.`picthumburl` AS `picthumburl`,`a`.`upmemguid` AS `upmemguid`,`a`.`pic_dollars` AS `pic_dollars`,`a`.`pic_storeonly` AS `pic_storeonly`,'PIC' AS `mediatype`,`a`.`picdate` AS `picdate` 
from `member_pics` `a` 
union select `b`.`memguid` AS `memguid`,`b`.`mp3url` AS `picurl`,`b`.`mp3title` AS `pictitle`,concat(`b`.`mp3seq`,' ',`b`.`mp3title`) AS `picstext`,'mp3default.jpg' AS `picthumburl`,`b`.`upmemguid` AS `upmemguid`,`b`.`mp3_dollars` AS `pic_dollars`,'yes' AS `pic_storeonly`,'MP3' AS `mediatype`,`b`.`mp3date` AS `picdate` 
from `member_mp3s` `b` order by `picdate` desc;

--
-- Final view structure for view `regmemfinder`
--

CREATE VIEW `regmemfinder` AS 
select `a`.`id` AS `memberguid`,`b`.`pagebanner` AS `picguid`,`a`.`reg_rname` AS `memname`,concat(`a`.`reg_rname`,' ',`b`.`headline`,' ',`b`.`headlineBody`,' ',`b`.`subheadlineOne`,' ',`b`.`subheadlineTwo`,' ',`b`.`pageBody`) AS `memvals`,`a`.`reg_scat` AS `reg_scat`,`a`.`mem_pro` AS `mem_pro` 
from (`reg_member` `a` join `rprofpage` `b`) 
where (`a`.`id` = `b`.`regmemid`) order by `a`.`reg_date` desc;



INSERT INTO `aboutpage` VALUES ('en','About Private  SOCIAL NETWORKs','Welcome to the new age of social media - the Private Social Network','Smartphones are everywhere. They are easy to use for high quality photographs and video. Almost all of the pictures and video that are taken by guests at events such as weddings, Bar Mitzvahs, corporate events and nights out on the town usually end up spread out over different Facebook and Instagram accounts. Our revolutionary application automatically uploads all of the pictures and video as they are taken by all of the different guests at an event and brings them all together into one webpage that everyone can view and share. For example, if 8 to 10 people are taking video and photographs at a wedding, the bride and groom may see a few of those pictures or videos, if they are tagged on Facebook. Our system gives the bride and groom a web page that lets them see all of the photographs and videos that all of their guests have taken. This webpage is represented by a link that can be emailed or texted to friends and relatives, so that everyone can see all of the high quality images that were taken by the guests at their wedding or event.\r\n','What it does.','Nightclubs can use our system to give their guests a way to see all of the different photographs and videos of the people that were sharing the same party. Our system allows anyone that has shared a photo or video from a nightclub, to select a photograph that is on the web page that represents that particular night in the club, and chat with the person in the picture. Our language learning chat engine will allow people to select the photograph or video of someone at the club and then start a conversation with them, even if they speak a different language. They will also be able to teach each other their different languages making the night club experience fun and educational. Maverick Marketplace will be the newest matchmaking system for partygoers. People are a lot more comfortable making contact through text, email and chat then approaching someone in a public environment.\r\n','about');
INSERT INTO `companypage` VALUES ('en','We are YOUR Private Social Network - yourpsn.com','Making private social networking easy, fun and secure','Nightclubs can use our system to give their guests a way to see all of the different photographs and videos of the people that were sharing the same party. Our system allows anyone that has shared a photo or video from a nightclub, to select a photograph that is on the web page that represents that particular night in the club, and chat with the person in the picture. Our language learning chat engine will allow people to select the photograph or video of someone at the club and then start a conversation with them, even if they speak a different language. They will also be able to teach each other their different languages making the night club experience fun and educational. Maverick Marketplace will be the newest matchmaking system for party-goers. People are a lot more comfortable making contact through text, email and chat then approaching someone in a public environment.','company');
INSERT INTO `contactpage` VALUES ('en','Corporate Address','4 Stone Hill Road, Marlborough MA 01752','+1 781-964-8881','davidh@picmelive.com','contact');
INSERT INTO `indexpage` VALUES ('en','Your Private Social Network','Anywhere, Any time!\r\n<a href=\"mailto:info@yourpsn.com?subject=Contacting Your PSN\" target=\"\\\\\\\\\\\\_top\">info@yourpsn.com</a>\r\n','Welcome to Your Own Private Social Network','Join Us and Join the Social Media Wave','Amp up your social network presence by creating your own private social network for colleagues, fans and friends.  Unlike others, this network gives you immediate brand presence, complete control over your image, and allows you to monetize your establishment, music, or charitable organization.\r\n\r\nUsing YourPSN, you can share pictures and videos, capture moments, create presence, and exchange ideas.\r\n\r\nAlso - with the in-app purchases, members of your network can purchase items for each other (like drinks in a bar) and reward talent (like tips for a performer on stage).\r\n\r\nUse our network and have the best social media presence in the world!\r\n','Sample Pages and Events...','News Feed...','index');
INSERT INTO `searchdiag` VALUES ('en','Search Vendors','Search Events','Search Products','<div style=\"font-size: 20px;line-height: 28px;\"><strong>Our beautiful market chalets are home to an elite groups of vendors offering a range of products from home decor, jewelry, gourmet foods, apparel and more! Fulfill your entire Christmas shopping list at New England\'s largest holiday market!<br><br>Get ready to knock out your Christmas shopping!  New vendors are still being added weekly, so check back before your visit to Boston Winter for the full list!</strong><br><br><a href=\"https://www.yumpu.com/en/document/view/59599679/boston-winter-coupon-book-3\" target=\"_blank\">Click Here</a> to flip through our Boston Winter Coupon Booklet! Use these coupons for amazing savings on your holiday shopping!</div>','Thank you');

INSERT INTO `reg_member` (`id`,`mem_login`,`reg_key`,`reg_hash`,`reg_pass`,`reg_rname`,`reg_lang`,`reg_phone`,`reg_age`,`reg_gender`,`reg_lessons`,`reg_country`,`reg_code`,`chatok`,`tchatok`,`reg_email`,`emailpref`,`reg_date`,`mem_pro`,`reg_scat`,`mem_cartid`)
VALUES ('GUID', 'ADMIN', 'cbb6ec866d7511e694b200259093be4fcbb769016d7511e694b200259093be4fcbb7e7716d7511e694b200259093be4fcbb863406d7511e694b200259093be4fcbb8e4166d7511e694b200259093be4fcbb95d136d7511e694b200259093be4fcbb9db3d6d7511e694b200259093be4fcbba54cd6d7511e694b200259093be', '8b4b6aa4035bcd44803e00512c636b7ab2d127d4', '7511e694b200259093be4fcbb66a356d7511e694b2', 'ADMIN', 'en', '', '101', '0', '', '178', '', '1', '1', null, '00001', null, '2', '', NULL);

