There are several tables with different column names, in fact they have the same date column by which to sort the sample. So, how can I derive news for the user? All his subscriptions, comments, replies to comments, replies to his posts, etc. I visited UNION, but there Zapara because of the different names in the table Who had experience what to do?
CREATE TABLE `dis` ( `id` int(11) NOT NULL auto_increment, `question_id` int(11) NOT NULL, `text` TEXT NOT NULL, `date` datetime NOT NULL default '0000-00-00 00:00:00', `from` int(11) NOT NULL, `to` int(11) NOT NULL, `ip` varchar(25) NOT NULL default '', `is_a` TINYINT(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE = MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=cp1251; CREATE TABLE `quest` ( `id` int(11) NOT NULL auto_increment, `text` TEXT NOT NULL, `date` datetime NOT NULL default '0000-00-00 00:00:00', `from` int(11) NOT NULL, `ip` varchar(25) NOT NULL default '', `is_a` TINYINT(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE = MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=cp1251;