标签: php database
如何根据前三个或五个等字母对从数据库中提取的数据进行排序?
$query = "SELECT * FROM macyayin ORDER BY channel, country";
答案 0 :(得分:0)
$query = "SELECT left(channel,3) as ch,channel,country FROM macyayin ORDER BY ch";