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

(This post was last modified: 04-06-2015, 03:10 PM by pompeu.)

(04-06-2015, 02:57 PM)CroNiX Wrote: I thought I did give an example? The above should work assuming the initial code you supplied is correct.

the above code returns an error:

Code:
A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/login.php

Line Number: 21

follows as did

Code:
        //Conexão e consulta com DB
        $query = $this->db->query("select email, country, pass from users where email = '$email' and pass = '$pass'");
        $executed = $query->result();
        $country = $executed->country;
        echo $country;

Thanks ^^
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