
数据库
让我看看谁在学习
学无止境
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数据库join用法
Left Join / Right Join /inner join左连接where只影向右表,右连接where只影响左表。1,Left Joinselect * from tbl1 Left Join tbl2 where tbl1.ID = tbl2.ID左连接后的检索结果是显示tbl1的所有数据和tbl2中满足where 条件的数据。2,Right Joinselect * ...原创 2018-11-29 10:42:49 · 450 阅读 · 0 评论 -
数据库报错1062:Duplicate entry '3' for key 'PRIMARY'
添加数据到数据库时报错:1062:Duplicate entry '3' for key 'PRIMARY' [ SQL语句 ] : INSERT INTO `m_order` (`Oid`,`Oevaluate`) VALUES ('3','1111')可能原因:1:将一个表中的有两个相同值的属性设为主键;2:主键重复出现;解决:将主键设置为自增; ...原创 2018-12-28 17:46:41 · 32384 阅读 · 0 评论 -
thinkphp中 select() 和find() 方法的区别
$about=M('document');$abouts=$about->where('id=2')->select();$abouts2=$about->where('id=2')->find();var_dump($abouts);var_dump($abouts2);输出结果: array (size=1)=> array (si...转载 2018-12-29 08:12:02 · 2119 阅读 · 0 评论