Search Bar for postgres db
Answered
Atlantic horse mackerel posted this in #help-forum
Atlantic horse mackerelOP
Hi, I am using Next.js for my front end, Node.js for backend, and a postgres MySQL db.
Goal: I have a db table of usernames. As a user types a name, I want to get results from the db and autocomplete the names from the db. This is common in applications but I can't find any resources on how to do this, any help?
Goal: I have a db table of usernames. As a user types a name, I want to get results from the db and autocomplete the names from the db. This is common in applications but I can't find any resources on how to do this, any help?
Answered by Toyger
you need some kind of ORM like drizzle or prisma to connect to database and query data.
3 Replies
Toyger
you need some kind of ORM like drizzle or prisma to connect to database and query data.
Answer
Yeah, I used both Dizzle and Prisma. I think they're both great. Used mysql with prisma and drizzle with SQLite. I dont know if its against the policy to share links, but in youtube you'll see lots of tutorials: nextjs + prisma or nextjs + drizzle
Atlantic horse mackerelOP
got it, thank you both!