if ($_SERVER['QUERY_STRING']) {
$q = $dbc -> prepare ("SELECT * FROM accounts WHERE email = ? && logcount = ''");
$q -> bind_param('s', ($_SERVER['QUERY_STRING']));
$r = $q -> execute();
if ($r) {
if (mysqli_num_rows($r) == 1) {
echo 'Account Active';
}
else {
header('location: create');
}
}}
Run Code Online (Sandbox Code Playgroud)
我知道这段代码不起作用,我已经为mysql_num_rows搜索了准备好的语句的答案,并且知道哪里有我能找到的答案!
谢谢.
num_rows是准备好的语句类的成员.它是在打电话后设定的execute.
$q->num_rows;
Run Code Online (Sandbox Code Playgroud)
http://www.php.net/manual/en/mysqli-stmt.num-rows.php