1. I have such a requirement: there are 4 kinds of inventory in the warehouse receipt. I want to check whether there is such inventory in the existing table. If there is, increase the quantity. If not, create new data; the where condition is an array. I should How to inquire?
2.where condition
Array
(
[0] => Array
(
[warehouse] => 办公用品仓库
[name] => 笔记本电脑
)
[1] => Array
(
[warehouse] => 办公用品仓库
[name] => 笔记本电脑
)
[2] => Array
(
[warehouse] => 办公用品仓库
[name] => 万用表
)
[3] => Array
(
[warehouse] => 办公用品仓库
[name] => 鼠标
)
)
3. Query statement, the following query is empty
$ch = $stock->where($where)->select();
I just learned it not long ago, and all the masters have provided me with some good ideas~~Thank you all
where conditions:
thinkphp 3.23?
thinkphp 5.0?
Correct answer upstairs. . . . . .