View Single Post
Old 08-06-2013, 04:52 PM  
eMonk
Confirmed User
 
Industry Role:
Join Date: Aug 2003
Location: Canada
Posts: 2,310
mysqli prepared statements num_rows

This keeps returning 0 results. Any ideas?

Code:
$qry1 = $db->prepare("SELECT id FROM user WHERE username = ? AND password = ?");
$qry1->bind_param('ss', $_GET['username'], $_GET['password']);
$qry1->execute(); 

$qry1->store_result();
$result_1 = $qry1->num_rows;

echo $result_1;
eMonk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote