[eluser]rhasan[/eluser]
Hi, I am running the following code from a controller
Code:
$this -> db -> select('age', 'name');
$query = $this -> db -> get('info');
foreach ( $query -> result() as $row){
echo $row -> name;
echo $row -> age;
echo br();
}
and expecting that it will show both age and name of users from info table but i am getting the following error
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$name
Filename: controllers/blog.php
Line Number: 37
It is showing only the age but not showing the name. How to correct this error?