[eluser]Jordz[/eluser]
G'day All,
I seem to be having trouble with returning information from my database.
In my controller I have:
Code:
function some(){
echo "<pre>";
$queue = $this->db->get_where('airports', array('icao'=>'ENGM'));
$test = $queue->result();
print_r( $test);
}
This returns the information from the database:
Array
(
[0] => stdClass Object
(
[id] => 170
[icao] => ENGM
[iata] => OSL
[country] => Norway
[name] => Oslo Gardermoen
)
)
However, when I attempt to access the data in the array like this $test->name I get an error:
Quote:Severity: Notice
Message: Trying to get property of non-object
Filename: controllers/screening.php
Line Number: 49
I've tried everything and cannot access the array at all.
Any idea's?
Thanks
Jordan