404
404
drop table t1,t2;
405
405
CREATE TABLE t1 (privatemessageid int NOT NULL auto_increment, folderid int NOT NULL default '0', userid int NOT NULL default '0', touserid int NOT NULL default '0', fromuserid int NOT NULL default '0', title varchar(250) NOT NULL default '', message mediumtext NOT NULL, dateline int NOT NULL default '0', showsignature int NOT NULL default '0', iconid int NOT NULL default '0', messageread int NOT NULL default '0', readtime int NOT NULL default '0', receipt int NOT NULL default '0', deleteprompt int NOT NULL default '0', multiplerecipients int NOT NULL default '0', PRIMARY KEY (privatemessageid), KEY userid (userid)) ENGINE=MyISAM;
406
406
INSERT INTO t1 VALUES (128,0,33,33,8,':D','',996121863,1,0,2,996122850,2,0,0);
407
CREATE TABLE t2 (userid int NOT NULL auto_increment, usergroupid int NOT NULL default '0', username varchar(50) NOT NULL default '', password varchar(50) NOT NULL default '', email varchar(50) NOT NULL default '', styleid int NOT NULL default '0', parentemail varchar(50) NOT NULL default '', coppauser int NOT NULL default '0', homepage varchar(100) NOT NULL default '', icq varchar(20) NOT NULL default '', aim varchar(20) NOT NULL default '', yahoo varchar(20) NOT NULL default '', signature mediumtext NOT NULL, adminemail int NOT NULL default '0', showemail int NOT NULL default '0', invisible int NOT NULL default '0', usertitle varchar(250) NOT NULL default '', customtitle int NOT NULL default '0', joindate int NOT NULL default '0', cookieuser int NOT NULL default '0', daysprune int NOT NULL default '0', lastvisit int NOT NULL default '0', lastactivity int NOT NULL default '0', lastpost int NOT NULL default '0', posts int NOT NULL default '0', timezoneoffset varchar(4) NOT NULL default '', emailnotification int NOT NULL default '0', buddylist mediumtext NOT NULL, ignorelist mediumtext NOT NULL, pmfolders mediumtext NOT NULL, receivepm int NOT NULL default '0', emailonpm int NOT NULL default '0', pmpopup int NOT NULL default '0', avatarid int NOT NULL default '0', avatarrevision int NOT NULL default '0', options int NOT NULL default '15', birthday date NOT NULL default '0000-00-00', maxposts int NOT NULL default '-1', startofweek int NOT NULL default '1', ipaddress varchar(20) NOT NULL default '', referrerid int NOT NULL default '0', nosessionhash int NOT NULL default '0', autorefresh int NOT NULL default '-1', messagepopup int NOT NULL default '0', inforum int NOT NULL default '0', ratenum int NOT NULL default '0', ratetotal int NOT NULL default '0', allowrate int NOT NULL default '1', PRIMARY KEY (userid), KEY usergroupid (usergroupid), KEY username (username), KEY inforum (inforum)) ENGINE=MyISAM;
408
INSERT INTO t2 VALUES (33,6,'Kevin','0','kevin@stileproject.com',1,'',0,'http://www.stileproject.com','','','','',1,1,0,'Administrator',0,996120694,1,-1,1030996168,1031027028,1030599436,36,'-6',0,'','','',1,0,1,0,0,15,'0000-00-00',-1,1,'64.0.0.0',0,1,-1,0,0,4,19,1);
407
CREATE TABLE t2 (userid int NOT NULL auto_increment, usergroupid int NOT NULL default '0', username varchar(50) NOT NULL default '', password varchar(50) NOT NULL default '', email varchar(50) NOT NULL default '', styleid int NOT NULL default '0', parentemail varchar(50) NOT NULL default '', coppauser int NOT NULL default '0', homepage varchar(100) NOT NULL default '', icq varchar(20) NOT NULL default '', aim varchar(20) NOT NULL default '', yahoo varchar(20) NOT NULL default '', signature mediumtext NOT NULL, adminemail int NOT NULL default '0', showemail int NOT NULL default '0', invisible int NOT NULL default '0', usertitle varchar(250) NOT NULL default '', customtitle int NOT NULL default '0', joindate int NOT NULL default '0', cookieuser int NOT NULL default '0', daysprune int NOT NULL default '0', lastvisit int NOT NULL default '0', lastactivity int NOT NULL default '0', lastpost int NOT NULL default '0', posts int NOT NULL default '0', timezoneoffset varchar(4) NOT NULL default '', emailnotification int NOT NULL default '0', buddylist mediumtext NOT NULL, ignorelist mediumtext NOT NULL, pmfolders mediumtext NOT NULL, receivepm int NOT NULL default '0', emailonpm int NOT NULL default '0', pmpopup int NOT NULL default '0', avatarid int NOT NULL default '0', avatarrevision int NOT NULL default '0', options int NOT NULL default '15', birthday date NULL, maxposts int NOT NULL default '-1', startofweek int NOT NULL default '1', ipaddress varchar(20) NOT NULL default '', referrerid int NOT NULL default '0', nosessionhash int NOT NULL default '0', autorefresh int NOT NULL default '-1', messagepopup int NOT NULL default '0', inforum int NOT NULL default '0', ratenum int NOT NULL default '0', ratetotal int NOT NULL default '0', allowrate int NOT NULL default '1', PRIMARY KEY (userid), KEY usergroupid (usergroupid), KEY username (username), KEY inforum (inforum)) ENGINE=MyISAM;
408
INSERT INTO t2 VALUES (33,6,'Kevin','0','kevin@stileproject.com',1,'',0,'http://www.stileproject.com','','','','',1,1,0,'Administrator',0,996120694,1,-1,1030996168,1031027028,1030599436,36,'-6',0,'','','',1,0,1,0,0,15,NULL,-1,1,'64.0.0.0',0,1,-1,0,0,4,19,1);
409
409
SELECT DISTINCT t1.*, t2.* FROM t1 LEFT JOIN t2 ON (t2.userid = t1.touserid);
410
410
privatemessageid folderid userid touserid fromuserid title message dateline showsignature iconid messageread readtime receipt deleteprompt multiplerecipients userid usergroupid username password email styleid parentemail coppauser homepage icq aim yahoo signature adminemail showemail invisible usertitle customtitle joindate cookieuser daysprune lastvisit lastactivity lastpost posts timezoneoffset emailnotification buddylist ignorelist pmfolders receivepm emailonpm pmpopup avatarid avatarrevision options birthday maxposts startofweek ipaddress referrerid nosessionhash autorefresh messagepopup inforum ratenum ratetotal allowrate
411
128 0 33 33 8 :D 996121863 1 0 2 996122850 2 0 0 33 6 Kevin 0 kevin@stileproject.com 1 0 http://www.stileproject.com 1 1 0 Administrator 0 996120694 1 -1 1030996168 1031027028 1030599436 36 -6 0 1 0 1 0 0 15 0000-00-00 -1 1 64.0.0.0 0 1 -1 0 0 4 19 1
411
128 0 33 33 8 :D 996121863 1 0 2 996122850 2 0 0 33 6 Kevin 0 kevin@stileproject.com 1 0 http://www.stileproject.com 1 1 0 Administrator 0 996120694 1 -1 1030996168 1031027028 1030599436 36 -6 0 1 0 1 0 0 15 NULL -1 1 64.0.0.0 0 1 -1 0 0 4 19 1
412
412
DROP TABLE t1,t2;
413
413
CREATE TABLE t1 (a int primary key, b int, c int);
414
414
INSERT t1 VALUES (1,2,3);