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');
}
}}
I know this code doesn’t work, I have searched for an answer to mysql_num_rows for prepared statements and know where has an answer that I can find!
Thanks.
num_rowsis a member of the prepared statement class. It’s set after callingexecute.http://www.php.net/manual/en/mysqli-stmt.num-rows.php