摘要:
查询当前数据的上一条和下一条数据,在MySQL里通过 ”order by“实现,例如: 上一条:select * from aft_article where id < 10 order by id desc limit 1 下一条:select * from aft_article where i 阅读全文
摘要:
定义 定义一对一关联使用了hasOne,hasOne方法的参数包括: hasOne('关联模型名','外键名','主键名',['模型别名定义'],'join类型'); 下面定义一个用户表,公司给每个用户发一辆车,表结构如下: #汽车表 create table car ( id int primar 阅读全文