I'm new to zend framework and i know this is a beginner level question.But i'm totally messed up.
I want to retrieve only user_id
and user_name
form database with descending order of user_id
.
I'm using tablegateway.
I'm calling getUsersTable() function as
$result = $this->getUsersTable()->select();
and getUsersTable() function is
public function getUsersTable()
{
if(!$this->usersTable)
{
$this->usersTable = new TableGateway('eo_user',$this->getServiceLocator()->get('Zend\Db\Adapter\Adapter')
);
}
return $this->usersTable;
}
I searched for similar problem but solution was not looking related to tablegateway.
What changes should i do?Please help.