Home > Backend Development > PHP Tutorial > mysql_affected_rows的返回值,该怎么解决

mysql_affected_rows的返回值,该怎么解决

WBOY
Release: 2016-06-13 12:52:21
Original
1410 people have browsed it

mysql_affected_rows的返回值

<br />
$result=mysql_query("update user set sex='{$_clean['sex']}',<br />
            						face='{$_clean['face']}',<br />
            						qq='{$_clean['qq']}',<br />
            						email='{$_clean['email']}',<br />
            						url='{$_clean['url']}'<br />
            						where    username='{$_COOKIE['username']}'",$conn);
Copy after login


为什么mysql_affected_rows()的返回是0,执行结果是正确的,按道理来说不是返回受影响的行数1吗?

没办法只能用 $result的值判断是否成功

mysql
------解决方案--------------------
但我也没有看到你执行 mysql_affected_rows 啊
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template