请教问题!
发表在PHP图书答疑
2008-06-03
是否精华
是
否
版块置顶:
是
否
<P>php自学手册p306实例ch16运行时候报错为:<STRONG>Warning</STRONG>: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in <B>C:\AppServ\www\register\savereg.php</B> on line <B>31</B><BR> 请教了 代码如下:</P>
<P>$sql="select usernc from tb_user where usernc='".$this->usernc."'";<BR> $result= mysql_db_query($sql,$mysql_database,$conn);<BR> if($info=mysql_fetch_array($result))<BR> {<BR> echo"<script>alert('该用户名已经被占用,请重新输入!');history.back();</script>" ;<BR> exit;<BR> }</P>
<P>$sql="select usernc from tb_user where usernc='".$this->usernc."'";<BR> $result= mysql_db_query($sql,$mysql_database,$conn);<BR> if($info=mysql_fetch_array($result))<BR> {<BR> echo"<script>alert('该用户名已经被占用,请重新输入!');history.back();</script>" ;<BR> exit;<BR> }</P>