Welcome Guest, Not a member yet? Register   Sign In
Trying to get property of non-object
#2

You can pass a database result object directly to table->generate(). It saves you all the trouble of looping through result_array().

The model becomes

PHP Code:
/**
 * @return an instanceof CI_DB_result
 */
public function memberslist()
{
 return 
$this->db
 
->order_by('username''ASC')
 ->
get('users');


The controller will work as you have it.
Reply


Messages In This Thread
RE: Trying to get property of non-object - by dave friend - 01-25-2018, 11:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB