Welcome Guest, Not a member yet? Register   Sign In
$query->num_rows nothing returns
#4

If it's true that your table name is in lower case and the fields are in firstcaps, then the next question is: do you really want to look for records that literally hold the values 'user' and 'password', or - which is more likely - do you want to get records that match a certain combination of username and password?
In that case, your query should look like this:
PHP Code:
$query $this->db->query("SELECT * FROM `usuario` WHERE `Usuario` = '$user' AND `Senha` = '$password'"); 
Reply


Messages In This Thread
$query->num_rows nothing returns - by mlfgo - 07-20-2015, 07:05 PM
RE: $query->num_rows nothing returns - by Wouter60 - 07-20-2015, 11:48 PM
RE: $query->num_rows nothing returns - by mlfgo - 07-22-2015, 05:15 AM
RE: $query->num_rows nothing returns - by Narf - 07-22-2015, 06:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB