的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();