Привет всем! Надеюсь на помощь гуру! Есть запрос Код (Text): $arr_query = $db->sql_query("SELECT * FROM ".$config['dbprefix']."news AS a LEFT JOIN ".$config['dbprefix']."story AS b ON (a.id=b.post_id) LEFT JOIN ".$config['dbprefix']."fields AS f ON (a.id=f.content_id) WHERE a.hidden='0' AND a.id='".$id."' LIMIT 0,1"); $query = array($db->sql_fetchrow($arr_query)); Что мы имеем. 1 новость (за неё отвечают таблицы story и news) и доп поля (таблица fields). Т.е. допустим есть новость с id = 5. Этой новости в таблице fields соответствуют несколько записей. Выборка по content_id (т.е. LEFT JOIN ".$config['dbprefix']."fields AS f ON (a.id=f.content_id)). Проблема в том, что конструкция LEFT JOIN ".$config['dbprefix']."fields позволяет мне получить только одну запись а не все соответствующие выборке. Вопрос. Как сделать так, что бы все соответствующие записи из ".$config['dbprefix']."fields выводились через 1 запрос? для большей наглядности предоставлю структуру таблиц: Код (Text): CREATE TABLE IF NOT EXISTS `{pref}fields` ( `fid` int(11) NOT NULL auto_increment, `modul` varchar(255) default NULL, `content_id` int(11) NOT NULL, `fname` text, `fvalue` text, `fnum` int(11) NOT NULL, `status` int(11) NOT NULL, `add_one` text, `add_two` text, PRIMARY KEY (`fid`) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1; CREATE TABLE IF NOT EXISTS `{pref}news` ( `date` int(11) NOT NULL, `author` varchar(255) default NULL, `title` varchar(255) NOT NULL, `c_short` int(11) NOT NULL, `c_full` int(11) NOT NULL, `avatar` varchar(255) NOT NULL, `category` varchar(255) NOT NULL, `url` varchar(255) NOT NULL, `id` int(11) NOT NULL auto_increment, `views` int(11) NOT NULL, `comments` int(11) NOT NULL, `hidden` tinyint(1) NOT NULL, `sticky` tinyint(1) NOT NULL, `keywords` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `parent` int(11) NOT NULL, `level` int(11) NOT NULL, `password` varchar(255) NOT NULL, `rating` int(11) NOT NULL, `votes` int(11) NOT NULL, `template` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `{pref}story` ( `post_id` int(11) NOT NULL auto_increment, `short` text NOT NULL, `full` longtext NOT NULL, `metatitle` text NOT NULL, `metakeywords` text NOT NULL, `metadescription` text NOT NULL, `ico` text NOT NULL, `add_comm` text, `stop_comm` text, `format` varchar(15) NOT NULL default 'html_with_br', `two` text NOT NULL, `three` text NOT NULL, PRIMARY KEY (`post_id`) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ;