i found the Warning:Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/u656351845/public_html/just/activation.php on line 11 Your account could not be activated!我的桌子没问题。当我运行代码时,数据库表值在id下从0升级到1。但我解决不了警告。代码在这里:<?php include_once "DB_connect.php"; $id = $_REQUEST['id']; $id = preg_replace("[^0-9]", "", $id);
和$sql = mysql_query("UPDATE loged_in_user SET emailactivated='1' WHERE id='$id'"); $sql_doublecheck=mysql_query("SELECT*FORM loged_in_user WHERE id='$id' AND emailactivated='1' LIMIT 1"); $doublecheck = mysql_num_rows($sql_doublecheck);
发布于 2014-01-11 07:29:09
这里的警告消息很清楚: mysql_num_rows()希望参数1是资源,布尔给定
有关函数"mysql_query",请参见PHP,如果失败,它将返回FALSE (布尔值)。
并且似乎失败了,因为您的语法不正确:在第二个查询中选择*表单
你需要用空格来选择它。
https://stackoverflow.com/questions/21059634
复制相似问题