摘要:
1.过滤字符串为空的一些记录的话,可以在sql_query中直接加上where来限制,如:sql_query= \SELECT a.location_id as id,a.location_id,a.location_name as `location_name`,a.location_name as `name`,a.location_bname,a.attach_id,a.showstatus,CRC32(a.showstatus) as crc32_showstatus,a.is_del,a.status,b.area_name as city_name FROM `ts_rdd_loc 阅读全文
摘要:
MySQL 查询in操作,查询结果按in集合顺序显示的实现代码,需要的朋友可以参考下。MySQL 查询in操作,查询结果按in集合顺序显示复制代码代码如下:select * from test where id in(3,1,5) order by find_in_set(id,'3,1,5');select * from test where id in(3,1,5) order by substring_index('3,1,2',id,1);偶尔看到的。。。或许有人会注意过,但我以前真不知道SQL: select * from table where id 阅读全文