-
Hello there! I want to calculate the await Inventory
.query()
.where('profile_id', profileId)
.andWhereNotNull(itemIdColumn)
.preload('armor', (query) => {
query.preload('image')
})
.orderBy(config.orderByColumn, config.orderBy)
.limit(config.limit)
.offset(config.offset)
.count('* as total') And then i have catching error P.S.: await Inventory
.query()
.where('profile_id', profileId)
.andWhereNotNull(itemIdColumn)
.preload('armor', (query) => {
query.preload('image')
})
.select('*') <----- this
.groupBy('inventories.id') <----- and this
.orderBy(config.orderByColumn, config.orderBy)
.limit(config.limit)
.offset(config.offset)
.count('* as total') After P.S.: |
Beta Was this translation helpful? Give feedback.
Answered by
DZ8540
May 4, 2023
Replies: 1 comment
-
Use |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
DZ8540
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use
clone
guys...https://stackoverflow.com/questions/52775863/how-to-get-one-page-data-list-and-total-count-from-database-with-knex-js