This is the code:
$q = $this->db->prepare("SELECT id FROM `users` WHERE username=? AND password=? LIMIT 1");
$q->bind_param('ss', $username, $password);
$q->execute();
printf('Rows returned: %i', $q->num_rows);
I am using MySQLi to try and check a users login credentials. Everything works and the query gets executed and data is returned (I have checked this seperately) but I only get this output: Rows returned:
Is there anything wrong here? I'm new to using MySQLi but going by the PHP.net examples there's nothing wrong with this code. Cheers.