原生的sql写法:
SELECT *
FROM br_esf_village_building
WHERE 1
ORDER BY CONVERT( `buildingName`
USING gbk )
COLLATE gbk_chinese_ci ASC
tp框架的写法:
$data = $this->where($where)->field($field)->order(‘CONVERT( `buildingName` USING gbk )COLLATE gbk_chinese_ci ASC‘)->select();
时间: 2024-10-06 15:36:26