目前有一個數據庫格式如下:MySQL的組由共享根域的URL數據行
ID(唯一ID)
網址:http://domain.com/page.html
URL是無論是從同一個域並來自不同的領域。
這也需要在一個查詢中完成,以便在向最終用戶顯示數據時可以使用限制等內容。
數據
1, http://domain.com/about.html
2, http://domain.com/index.html
3, http://anotherdomain.com/index.html
4, http://anotherdomain.com/contact.html
期望輸出
(我只想要返回第一個URL(第一次是在以往的順序數據正在整理中,這個例子是「ID ASC 「),其中一組由共享根域的URL組成)
1, http://domain.com/about.html
3, http://anotherdomain.com/index.html
歡迎時到StackOverflow,@thisisrobv。 – Sampson 2010-01-29 20:34:38
url字段上的常規'order by'會不會將它們排序爲簇? – Sampson 2010-01-29 20:36:15
對不起,我添加了數據,並期望輸出更好地解釋我正在嘗試做什麼。 – thisisrobv 2010-01-29 20:38:19