可能重复:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in selectmysql_num_rows()预计参数1是登记表格上资源错误消息
我正在与两个MySQL表对应一个登记表上我的数据库。
- 用户登陆 - 包含所有与该网站
- userlogin_fb注册的详细信息 - 包含使用FB连接设备
现在,用户的所有细节,当用户注册后不能有一个冲突用户名或邮箱地址。我现在推行的验证码在两个表检查的电子邮件地址(这将被用来作为用户名的验证参考):
,但我不断收到以下错误信息:
警告:mysql_num_rows()预计 参数1是资源,布尔 在register.php给出线144
我怎么去有关解决呢?
//select all rows from our users table where the emails match
$res1 = mysql_query("SELECT * FROM `userloginl.email`,`userlogin_fb.email` WHERE `email` = '".$email."'");
$num1 = mysql_num_rows($res1);
//if the number of matchs is 1
if($num1 == 1){
//the email address supplied is taken so display error message
echo "<center>The <b>e-mail</b> address you supplied is already taken</center>";
include_once ("resources/php/footer.php");
exit;
}else{
//finally, otherwise register there account }
任何帮助将不胜感激 - 谢谢!