Welcome Guest, Not a member yet? Register   Sign In
Model query with paging does not work
#1

When I use pagination and in the query there is an 'orderBy()',  codeigniter returns an error: Duplicate column name 'created_at'.
Does anyone know how to resolve this situation?
My code:

Code:
$transacao = $this->transacao_model        
->select('*')
->where('event.id', 32)
->join('...')
...
->orderBy('event.id');

$data = [
  'transacao' => $transacao->paginate(30, ''),
  'pager' => $transacao->pager
];


Ps.
Sorry for my english.
Reply


Messages In This Thread
Model query with paging does not work - by Thiaxl - 09-16-2021, 09:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB