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

You didn't grab the result from the executed query and access the 'country' column from the result
PHP Code:
$country $this-> db- > query ("select country from users where email = '$email' and password = '$password' " ) ;

//execute the query
$executed $country->result(); //normally I'd add ->result() to the above query...

//grab the country field from the result
$var_country $executed->country
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