Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何根据前三个或五个或其他字母对从数据库中提取的数据进行排序?
$query = "SELECT * FROM macyayin ORDER BY channel, country";
例如对于这个例子。我想根据频道的三个字母排序..
$query = "SELECT left(channel,3) as ch,channel,country FROM macyayin ORDER BY ch";