mysql - php 同一個值排列一起?
ringa_lee
ringa_lee 2017-04-11 09:52:55
0
1
322
$supportwords = mysql_query("SELECT * FROM `support`
ORDER BY `sort` ASC

想問一下
每個數據都有一個 type 字段(當作是分類)
我如何讓他排列sort同時,能夠把若是type一樣的都擺在一起?
就是顯示出來不會每個 type都不太一樣

ringa_lee
ringa_lee

ringa_lee

reply all(1)
小葫芦

伪代码:

$type = '你的类型';
$supportwords = mysql_query("SELECT * FROM `support` where type='$type' ORDER BY `sort` ASC");
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template