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

(09-16-2021, 05:50 PM)wdeda Wrote: My apologies, for greater understanding I will use our native language, mine and #thiaxi's, Portuguese.

Vamos lá. Acredito que as coisas estão invertidas, para não complicar muito, abaixo, um controller meu, bem similar ao seu. Penso que lhe dará, espero, a montagem correta:
PHP Code:
$model = new AlbumModel();      

        $style 
$model->getGenre1($id);        

        $data 
= [
            'genre1' => $model->orderBy('player_id''ano''title''asc')
            ->where('style1'$style)
            ->paginate(20), 
            'pager' => $model->pager,
            'total' => $model->numGenre1($id),
            'genre' => $model->getGenre1($id),
            'linkx' => $model->getLinkx($id)                        
        
]; 

Good Morning. Thanks for the answer. I tried to use your answer to fix the error but it didn't work.

Paging does not work with GroupBy.
If I remove GroupBy, the code works.

I'm uploading some images of the error.

[Image: 0asQzGQ.jpg]

[Image: yTXTO98.jpg]
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB