摘要:
4、DB类操作数据库(重点)按照MVC 的架构,对数据的操作应该放在 Model 中完成,但如果不使用Model,我们也可以用 laravel框架提供的 DB 类操作数据库。而且,对于某些极其复杂的sql,用Model 已经很难完成,需要开发者自己手写sql语句,使用 DB 类去执行原生sql。 l 阅读全文
摘要:
字符串’^198[0-9]$’可以匹配‘1980-1989’,如果希望统计出公司那些员工是80年~89年入职的,就可以使用如下的SQL语句: select * from emp e where regexp_like(to_char( e.hiredate,'yyyy'),'^198[0-9]$') 阅读全文
摘要:
这是报错信息:SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated colum 阅读全文