Просмотр поста #86071: Помогите составить SQL запрос.

.
Windler
Koenig (01.12.2012 / 14:34)
Windler, структуру таблиц выложи
actions:

CREATE TABLE IF NOT EXISTS `actions` (
`object` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`time` int(10) NOT NULL,
`type` varchar(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

comm:

CREATE TABLE IF NOT EXISTS `comm` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`refid` int(11) NOT NULL,
`realid` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`text` text NOT NULL,
`rights` int(1) NOT NULL,
`time` int(10) NOT NULL,
`pchat` int(11) NOT NULL,
`lastdate` int(10) NOT NULL,
`tos` int(10) NOT NULL,
`DayOnline` int(10) NOT NULL,
`wchat` int(1) NOT NULL,
`rchat` int(1) NOT NULL,
`wforum` int(1) NOT NULL,
`rforum` int(1) NOT NULL,
`enter` int(1) NOT NULL,
`type` varchar(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;