aarondfrancis / fast-paginate

A fast implementation of offset/limit pagination for Laravel.
MIT License
1.21k stars 56 forks source link

Integrity constraint violation: 1052 Column 'created_at' in order clause is ambiguous #47

Closed fviip closed 1 year ago

fviip commented 1 year ago

'php $tags = $post->tags()->orderBy('created_at', 'desc')->fastPaginate(20); '

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'created_at' in order clause is ambiguous

parallels999 commented 1 year ago

Show the SQL

aarondfrancis commented 1 year ago

I'm not sure this is a fastPaginate problem. Can you show the SQL or schema? Does it work with the traditional paginate method?