我試圖找出如何列出公司類別的,品牌的,在佈局將類似於此:PHP MySQL的顯示由公共字段分組多行
公司1
類別1:
BRAND X
品牌Y
BRANDžCATEGORY 2
品牌
BRAND乙
C品牌CATEGORY 3
品牌
BRAND X
我不夠熟悉PHP + MySQL按順序查找正確的SEARCH和PHP輸出 爲了達成這個。
我的表看起來與此類似:
COMPANY | CATEGORY | BRAND -------------------------------- Company 1 | Category 2 | Brand A Company 1 | Category 2 | Brand B Company 1 | Category 2 | Brand C Company 1 | Category 1 | Brand X Company 1 | Category 1 | Brand Y Company 1 | Category 1 | Brand Z Company 1 | Category 3 | Brand A Company 1 | Category 3 | Brand X
@ajreal感謝您的編輯! – 3r1c 2010-12-02 20:49:24