alessandroooo
alessandroooo
PPrisma
Created by alessandroooo on 3/25/2024 in #help-and-questions
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?
3 replies