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

mysql_affected_rows的返回值,该怎么解决

WBOY
WBOYOriginal
2016-06-13 12:52:211358browse

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


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

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

mysql
------解决方案--------------------
但我也没有看到你执行 mysql_affected_rows 啊
Statement:
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