gpt4 book ai didi

php - 使用PHP在mysql更新中影响的行

转载 作者:IT王子 更新时间:2023-10-28 23:45:50 26 4
gpt4 key购买 nike

我如何查找我的更新是否成功?我使用where uniqueName = name进行更新,因此我应该始终仅更新0行或1。什么是检查我是否更新了行的好方法?

最佳答案

mysql_affected_rows()将返回受更新影响的行数。

http://us.php.net/manual/en/function.mysql-affected-rows.php

关于php - 使用PHP在mysql更新中影响的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1487675/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com