zoukankan
html css js c++ java
updateOrCreate()注意项
updateOrCreate()默认的主键是id,如果自增主键名不是id就要在模型中声明主键
protected $primaryKey = 'categories_description_id';
不然使用updateOrCreate()进行新增数据将无法新增,报错Column not found: 1054 Unknown column 'id' in 'where clause'
踩过这个坑,还有下一个坑等着你,这一路就是给自己填坑,坑填多了,也就习惯了,直到这一路平坦了,也就无怨无悔了。
查看全文
相关阅读:
BZOJ 1452 Count(二维树状数组)
BZOJ 1407 Savage(拓展欧几里得)
BZOJ 1415 聪聪和可可(期望DP)
BZOJ 1406 密码箱(数论)
最大流小结
UVA6531Go up the ultras
二分图小结
Codeforces Round #243 (Div. 1)
图论模板集合
zoj3416 Balanced Number
原文地址:https://www.cnblogs.com/xiaofeilin/p/14953920.html
最新文章
求组合数的方法:转载自VincentCZW的博客
Educational Codeforces Round 11C. Hard Process two pointer
Educational Codeforces Round 11B. Seating On Bus 模拟
Educational Codeforces Round 11A. Co-prime Array 数学
杭电1025Constructing Roads In JGShining's Kingdom
codeforces118D. Caesar's Legions
杭电1024Max Sum Plus Plus
杭电1023Train Problem II
Codeforces Round #346 (Div. 2)D. Bicycle Race
Codeforces Round #346 (Div. 2)C. Tanya and Toys
热门文章
Codeforces Round #346 (Div. 2)B. Qualifying Contest
Codeforces Round #346 (Div. 2)A. Round House
杭电1022Train Problem I
杭电1021Fibonacci Again
BZOJ 1560 火星藏宝图(DP)
BZOJ 1509 逃学的小孩(树的直径)
BZOJ 1486 最小圈(01分数规划)
BZOJ 1491 社交网络(最短路)
BZOJ 1443 游戏(二分图博弈)
BZOJ 1497 最大获利(最大权闭合子图)
Copyright © 2011-2022 走看看