(11-29-2014, 05:10 PM)Rufnex Wrote: You have called the row() method wrong, try this:
PHP Code:
function test() {
$test = $this->db->query("SELECT name FROM users");
$name = $test->row()->name;s e
return $name;
}
I apologise, I thought it correct, I wrote wrong.
This example does not work:
function test() {
$test = $this->db->query("SELECT name FROM users");
$name = $test->row()->name;
return $name;
}
echo test();
The error is same:
Fatal error: Using $this when not in object context in /folder/with/my/project/admin.php on line 248