Welcome Guest, Not a member yet? Register   Sign In
consulting variable
#6

Your original query ($query) most likely failed. Did you supply a valid $email and $pass?

Try this (for testing):
PHP Code:
$query $this->db->query("select email, country, pass from users where email = '$email' and pass = '$pass'")->result();
if (
$query//test if query was successful
{
  echo 
'Country = ' $query->country;
}
else
{
  echo 
'ERROR in Query:<br>' $this->db->last_query();

Reply


Messages In This Thread
consulting variable - by pompeu - 04-06-2015, 01:30 PM
RE: consulting variable - by CroNiX - 04-06-2015, 02:06 PM
RE: consulting variable - by pompeu - 04-06-2015, 02:31 PM
RE: consulting variable - by CroNiX - 04-06-2015, 02:57 PM
RE: consulting variable - by pompeu - 04-06-2015, 03:08 PM
RE: consulting variable - by CroNiX - 04-06-2015, 03:30 PM
RE: consulting variable - by pompeu - 04-06-2015, 03:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB