View Single Post
Old 08-06-2013, 05:02 PM  
EddyTheDog
Just Doing My Own Thing
 
EddyTheDog's Avatar
 
Industry Role:
Join Date: Jan 2011
Location: London, Spain, New Zealand, GFY - Not Croydon...
Posts: 25,272
Quote:
Originally Posted by eMonk View Post
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;
that's because ->bind_result() is a method of the mysqli_stmt class. it's not a method of the mysqli class.

lol - Just kidding - It's a small world...
EddyTheDog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote