多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
- 简单查询 ~~~ set names utf8; 设置编码 select * from biao 基本查询 select distinct id from biao 结果字段不重复 select * from biao order by id desc ,time asc; 升序降序 select * from biao group by sex having; 分组筛选 select * from biao limit 4 返回4条 select * from biao 4,3 返回3条,从第5条记录开始 select a,b,c from A inner join B on A.id = B.id; 内连接 select a,b,c from A,B where A.id=B.id;内连接 select * from A left join B on A.id=B.id; 左连接 select * from A right join B on A.id=B.id;右连接 select id from Table where id2 in(select id3 from Table2) 子查询 select id from Table where find_in_set(type,"ssq,sd,pls") 查询分类 select id as ID from A as a 别名 select * from A union all select * from B 合并结果集 select * from A union select * from B 去重复 SELECT id,title FROM article WHERE id<$id ORDER BY id desc LIMIT 1 上一篇 SELECT id,title FROM article WHERE id>$id ORDER BY id ASC LIMIT 1 下一篇 select count(distinct openid) as total from TB 统计记录去重复 ~~~