-1

如何根据前三个或五个或其他字母对从数据库中提取的数据进行排序?

$query = "SELECT * FROM macyayin ORDER BY channel, country";

例如对于这个例子。我想根据频道的三个字母排序..

4

1 回答 1

0
$query = "SELECT left(channel,3) as ch,channel,country FROM macyayin ORDER BY ch";
于 2013-03-02T13:48:24.760 回答