mysql查询区分大小写: SELECT id,developer FROM products WHERE developer != '' and developer = binary('LYNN') 在查找的条件值加上的binary() 来源:http://my.oschina.net/xiangtao/blog/33983 mysql自定义排序: ,,,,); select * from user order by field(roleId,'张三','李四','王五'); $str = "…