摘要: 获取时间 data(https://www.cnblogs.com/mrluotong/p/5895375.html);strtotime() <?php echo "今天:".date("Y-m-d")."<br>"; echo "昨天:".date("Y-m-d",strtotime("-1 d 阅读全文
posted @ 2019-08-29 16:41 潇宸1998 阅读(182) 评论(0) 推荐(0)
摘要: 本文主要列举两张和三张表来讲述多表连接查询。 新建两张表: 表1:student 截图如下: 表2:course 截图如下: (此时这样建表只是为了演示连接SQL语句,当然实际开发中我们不会这样建表,实际开发中这两个表会有自己不同的主键。) 一、外连接 外连接可分为:左连接、右连接、完全外连接。 1 阅读全文
posted @ 2019-08-29 14:21 潇宸1998 阅读(286) 评论(0) 推荐(0)
摘要: A、B两表,找出ID字段中,存在A表,但是不存在B表的数据。 A表 课程表 B表 学生表 方法一:使用 not inselect distinct A.ID from A where A.ID not in (select ID from B) 方法二:使用 left join...on... , 阅读全文
posted @ 2019-08-29 11:23 潇宸1998 阅读(169) 评论(0) 推荐(0)