以下查詢顯示多個同一用戶,如何使其唯一?唯一記錄查詢
$query = 'SELECT a.connection_id, a.connect_from, a.connect_to,
b.userid, b.thumb, c.name, d.user_id, d.field_id,
d.value as bday, e.creator, e.id as videoprofile,
DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(),d.value)), "%Y")+0 AS age
FROM `#__community_connection` AS a
LEFT JOIN `#__community_users` AS b
ON a.connect_to = b.userid
LEFT JOIN `#__users` AS c ON a.connect_to = c.id
LEFT JOIN `#__community_fields_values` AS d
ON a.connect_to = d.user_id
LEFT JOIN `#__community_videos` AS e ON a.connect_to = e.creator
WHERE a.connect_from = "' . $uid .'" AND d.field_id = "3"
ORDER BY DAYOFMONTH(bday) ASC';
+1,但是票數不足 – Johan 2011-05-22 22:21:47
@Johan,+1對您對道德支持的評論。 :-) – 2011-05-25 14:23:01