本帖最后由 lazygc520 于 2013-09-05 13:13:44 编辑
已知数组a和数组b
<br />
$a = array (<br />
0 => <br />
array (<br />
'cust_no' => '310F6 1VA5A',<br />
'lotno' => '2X15',<br />
'count' => '0',<br />
),<br />
1 => <br />
array (<br />
'cust_no' => '310F6 1VA5A',<br />
'lotno' => '2Z15',<br />
'count' => '16',<br />
),<br />
);<br />
<br />
$b = array (<br />
0 => <br />
array (<br />
'cust_no' => '310F6 1VA5A',<br />
'lotno' => '2X15',<br />
'count' => '0',<br />
),<br />
1 => <br />
array (<br />
'cust_no' => '310F6 1VA5A',<br />
'lotno' => '2Z15',<br />
'count' => '32',<br />
),<br />
2 => <br />
array (<br />
'cust_no' => '310F6 1VA5A',<br />
'lotno' => '3528',<br />
'count' => '80',<br />
),<br />
);<br />
想要得到的结果是当数组b和数组a的cust_no和lotno都相同时,则提示update table sql
否则insert table sql。请问怎么求?