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 User4mo ago
Message Not Public
Sign In & Join Server To View
alessandroooo
alessandroooo4mo ago
thanks