摘要: PHP输出时间差函数<?phpdate_default_timezone_set('PRC'); //默认时区echo "今天:",date("Y-m-d",time()),"<br>";echo "今天:",date("Y-m-d",strtotime("18 june 2008")),"<br>";echo "昨天:",date("Y-m-d",strtotime(& 阅读全文
posted @ 2013-05-15 11:21 不再犹豫、 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 本文主要列举两张和三张表来讲述多表连接查询。新建两张表:表1:student 截图如下:表2:course 截图如下:(此时这样建表只是为了演示连接SQL语句,当然实际开发中我们不会这样建表,实际开发中这两个表会有自己不同的主键。)一、外连接外连接可分为:左连接、右连接、完全外连接。1、左连接 left join 或 left outer joinSQL语句:select * from student left join course on student.ID=course.ID执行结果:左外连接包含left join左表所有行,如果左表中某行在右表没有匹配,则结果中对应行右表的部分全部为空 阅读全文
posted @ 2013-05-15 10:22 不再犹豫、 阅读(197) 评论(0) 推荐(0) 编辑
摘要: PHP输出时间差函数<?phpdate_default_timezone_set('PRC'); //默认时区echo "今天:",date("Y-m-d",time()),"<br>";echo "今天:",date("Y-m-d",strtotime("18 june 2008")),"<br>";echo "昨天:",date("Y-m-d",strtotime(& 阅读全文
posted @ 2013-05-15 09:49 不再犹豫、 阅读(149) 评论(0) 推荐(0) 编辑