How do I find records then select only 10 of them between (example) 40 and 50

Hello. basically I need to create pages because I don't want to print 100 records on the screen. I only want to select 10 of them. If I have 100, page 1 will show 1 to 10, page 2 will show 11 to 20 etc.
const getAllUserMedia = async (email: string) => {
const res = await prisma.media.findMany({where: {user: email} })
return res;
}
const getAllUserMedia = async (email: string) => {
const res = await prisma.media.findMany({where: {user: email} })
return res;
}
this is my function, where I'm only selecting the user. How could I edit it?
2 Replies
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
alessandroooo
alessandrooooOP9mo ago
thanks
Want results from more Discord servers?
Add your server