0
- 的值的列($ _SESSION [「VAL1」])這兩個表中的索引(外鍵)
- 的「過程」的方法是事先準備好的聲明
- 我想$合併獲取和連接$ get2在MySQL
代碼...(INSERT +在DuplicateKey更新)+更新?
$get = $call->process("INSERT INTO table1 VALUES (?, ?, ?, ?, UTC_TIMESTAMP(), 0)
ON DUPLICATE KEY
UPDATE col4 = ?, col5 = UTC_TIMESTAMP()",
array($_SESSION['val1+val2'], $_SESSION['val1'], $_SESSION['val2'], 'OK', 'NOOK'));
if($get)
{
$get2 = $call->process("UPDATE table2 SET col8 = col8 + 1 WHERE colval1 = ?",
array($_SESSION['val1']));
}
應創建存儲過程?
替換會刪除行(如果存在)。我只想使用重複密鑰.... – Frank11