mysql STATE显示"更新" INFO显示" DELETE"在Show Full Processlist中

时间:2015-10-22 19:09:50

标签: php mysql sql mysqli

的MySQL>显示完整的过程列表;

--------------------------------------------------------
    | Command   |   Time    |   State       |   Info
--------------------------------------------------------
      Execute   |   24      |   updating    |   DELETE FROM table WHERE account_id=? and date=?

如何使用DELETE而不是使用UPDATE?

PHP代码是这样的:

$stmt = $mysqli->prepare("INSERT INTO table(account_id,data,date) VALUES(?,?,?) ON DUPLICATE KEY UPDATE data = VALUES(data)");
            $stmt->bind_param('iss', $account_id,$data,$date);
            $stmt->execute();
            $stmt->close();

0 个答案:

没有答案