$supportwords = mysql_query("SELECT * FROM `support`ORDER BY `sort` ASC)
想問一下
每個數據都有一個 type 字段(當作是分類)
我如何讓他排列sort同時,能夠把若是type一樣的都擺在一起?
就是顯示出來不會每個 type都不太一樣
数据分析师2017-10-01 00:26:56
php Arrange the same value together? -PHP Chinese website Q&A-php The same value is arranged together? -PHP Chinese website Q&A
Let’s take a look and learn.
巴扎黑2017-02-20 13:59:11
伪代码:
$type = '你的类型'; $supportwords = mysql_query("SELECT * FROM `support` where type='$type' ORDER BY `sort` ASC");