![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
夏至春来-美美
这个作者很懒,什么都没留下…
展开
-
mysql无法连接内网的数据库
mysql无法链接内网的数据库原创 2022-06-27 17:57:15 · 984 阅读 · 1 评论 -
mysql中的一些方法使用
1.withAttr:如需要在mysql中调整字段的展示内容,可使用withAttrwithAttr方法支持多次调用,定义多个字段的获取器。另外注意,withAttr方法之后不能再使用模型的查询方法,必须使用Db类的查询方法。如:attendance :本身是20220108,需要得到的数据为2022-01-08操作:self::where('uid',$uid)->where('attendance_month',$month) ->where($where)-原创 2022-02-18 12:04:27 · 401 阅读 · 0 评论 -
mysql修改自身数据字段
mysql修改自身数据字段原创 2022-05-23 10:34:49 · 342 阅读 · 0 评论 -
mysql 的field中统计数字之后成为了字符串,再转换为数字进行排序
if ($sort){$order = ‘totle_hours asc’;}else{$order = ‘totle_hours desc’;}data[′data′]=(newStudentPunchCard())−>alias(′s′)−>leftJoin(′hisichildrenc′,′c.id=s.cid′)−>leftJoin(′hisiuseru′,′u.id=c.uid′)−>leftJoin(′hisidementgroupd′,′d.id=c.scho原创 2021-12-17 17:44:40 · 611 阅读 · 0 评论 -
Tp6 多表关联(A表关联B表,B表关联C表,D表)
A表(设置field字段的时候,B表中的字段一定要添加完关联的字段,不然打印的内容会为null,C,D表的字段可以为自己需要的字段,不过一定要有id,也就是与B表关联的字段)自己走过的坑,希望为大家解惑哟B表C表D表...原创 2021-10-21 11:07:50 · 1745 阅读 · 0 评论 -
group by和order by一起使用
mysql 写sql的顺序:select -> from-> where->group by->having->order by.但mysql的解析器执行顺序:from-> where->group by->having->select->order by.A表-------- id order_number(不是唯一的)B表-------- id ex_id(A中的order_number不是唯一的) del_status(1,2,3)原创 2021-09-02 11:10:56 · 505 阅读 · 0 评论