Distincthttp://softtime.ru/forumDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333833PHP средствами все работает отлично! Спасибо огромное!DistinctMon, 1 Sep 2008 06:20:29 +0300chexovDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333741pole2 разделитель спискаDistinctSun, 31 Aug 2008 19:20:16 +0300TrianonDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333740"?php $q = mysql_query("SELECT `pole1`, `pole2` FROM `table` ORDER BY pole1, pole2 "); $curr = false; echo ""ul""; while ($arr...DistinctSun, 31 Aug 2008 19:18:14 +0300TrianonDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333735 ORDER BY pole SEPARATOR ',' по какому полю сортируем? по 1 или 2 и что такое ',' ?DistinctSun, 31 Aug 2008 18:58:18 +0300chexovDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333733 "?php $q = mysql_query("SELECT distinct(`pole1`), `pole2` FROM `table`;"); while ($arr = mysql_fetch_assoc($q)) { echo " "ul" "li"'.$arr.' группа "ul"...DistinctSun, 31 Aug 2008 18:56:55 +0300chexovDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333725SELECT pole1, GROUP_CONCAT(pole2 ORDER BY pole SEPARATOR ',') FROM tbl GROUP BY pole1 Что до php - показывайте код, который...DistinctSun, 31 Aug 2008 18:32:43 +0300TrianonDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333723Подскажите как через GROUP_CONCAT() и как через php если можно наглядноDistinctSun, 31 Aug 2008 18:10:29 +0300chexovDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333629Есть, правда, вариант запроса, который вернет 1 | user1,user2 2 | user3 3 | user4 4 | user5,user6 ...DistinctSun, 31 Aug 2008 13:48:08 +0300TrianonDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333628почему тогда не так: группа 1- user1 - user2 группа2 - user3 группа3 - user4 группа4 -user5 -user6 ...DistinctSun, 31 Aug 2008 13:43:44 +0300TrianonDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333627 - user1 группа 1- user2 группа2 - user3 группа3 - user4 -user5 группа4 -user6 примерно такDistinctSun, 31 Aug 2008 13:33:16 +0300chexovDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333597Вы не показали, каким должен быть вывод.DistinctSun, 31 Aug 2008 11:46:39 +0300TrianonDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333576абсолютно! объясняю подробнее: в таблице хранятся данные о пользователе, Pole1 содержит номера групп, а pole 2 содержит имена пользоваетелей(неповторяемые), так...DistinctSun, 31 Aug 2008 07:49:45 +0300chexovDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333316"так как я вывожу не только уникальные значения pole1 но и все значения pole2 Вы сами хоть, понимаете, что хотите?DistinctSat, 30 Aug 2008 00:00:19 +0300AcidTrashDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333306Вы обязательно DISTINCT хотите воспользоваться? GROUP BY не подойдет?DistinctFri, 29 Aug 2008 22:12:37 +0300cheopsDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333287спецификатор DISTINCT обеспечивает уникальность строк результата, а вовсе не отдельных полей. Да и как бы ему иначе-то? А что Вы...DistinctFri, 29 Aug 2008 19:54:55 +0300TrianonDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333281Какие соображения?DistinctFri, 29 Aug 2008 19:46:47 +0300chexovDistincthttp://softtime.ru/forum/read.php?id_forum=3&id_theme=57306#post333132Итак делаю запрос: $q = mysql_query("SELECT distinct(`pole1`), `pole2` FROM `table`;"); pole1 типа varchar(3) pole2 типа varchar (255) и...DistinctFri, 29 Aug 2008 10:35:57 +0300chexov