Fetch Job Details by ID Using Dynamic Routes | Next.js + Drizzle ORM + MySQL

Thapa Technical
Thapa Technical
63 followers
Jan 30, 2026  #70

📂 Source Code
👉 GitHub Repo: https://github.com/thapatechnical/job-portal-nextjs

------------------------------------------------------------------------------------
In Video #70 of our Job Portal Application Series, we focus on the backend logic of fetching job details by ID using Next.js dynamic routes, TypeScript, MySQL, and Drizzle ORM.

In this video, we are working on the Applicant Dashboard. When an applicant clicks on a job card, we navigate to a dynamic route and extract the job ID from the URL using Next.js params. With that ID, we fetch job details from multiple tables using Drizzle ORM joins and proper query conditions.

This video is UI-independent and purely focused on:

Backend thinking

Query design

Folder structure

Data fetching using ID

Validations using SQL conditions

📌 Must-watch if you want to build real-world applications using Next.js App Router + Drizzle ORM.
🔗 Useful Playlists

📘 Next.js Full Stack Playlist:
https://youtube.com/playlist?list=PLwGdqUZWnOp0lwvSBaIzzgV9X0ZiZ-42O&si=aQ_TNBNNx5L7V_bn

⚛️ React.js Playlist:
https://youtube.com/playlist?list=PLwGdqUZWnOp1Rab71vx2zMF6qpwGDB2Z1&si=sDZRxsYNetYmojKd

💻 TypeScript Playlist:
https://youtube.com/playlist?list=PLwGdqUZWnOp0xfHQFmlL52b_6-QZ0mnk_&si=c4jfsd5ElDC1p0A5
------------------------------------------------------------------------------------
💸 Get All My YouTube Videos' Source Code for just ₹199! Grab Now - https://thapatechnical.shop/source-code

📺 Watch the complete Node.JS Playlist here :https://youtube.com/playlist?list=PLwGdqUZWnOp3KELplHtc-RnJ5xTUPqdgH&si=_ob8F88HYxCdspup

🔥 Access Source Code, PPT & Notes here for Free : https://www.thapatechnical.com/2024/11/introduction-to-nodejs.html
------------------------------------------------------------------------

🚀 Boost Your Skills with these Pre-Requisite Videos:

🔗 Best HTML Course - https://youtu.be/5ccq_nLHneE
🔗 Best CSS Course - https://youtu.be/MSICFljRcb4
🔗 JavaScript Basics Course Part 1 - https://youtu.be/13gLB6hDHR8
🔗 JavaScript Advanced Course Part 2 - https://youtu.be/YwsOCN8woA8

------------------------------------------------------------------------
💸 Build Your Own E-commerce Website for Free! - https://www.thapatechnical.com/2024/03/build-complete-ecommerce-website-using.html

------------------------------------------------------------------------
✌️ Join Us!

🚀 Become a Member: Unlock perks, free source code, and more Join Now : https://www.youtube.com/channel/UCwfaAHy4zQUb2APNOGXUCCA/join
📷 Connect on Instagram: https://www.instagram.com/thapatechnical
🗨️ Join Our Discord Server: Hang out with fellow programmers Discord Link: https://discord.gg/MdScmCsua6

------------------------------------------------------------------------

⌛TIMELINE⏳
0:00 – Fetching job data using ID (overview)
1:30 – How we are getting ID from dynamic route
2:28 – Must watch & support the channel ❤️
2:40 – Understanding folder structure
3:20 – How Next.js reaches the dynamic page
4:20 – What happens if wrong ID is passed
5:30 – Folder structure for getJobById query
6:24 – Thinking before writing database queries
8:50 – getJobById() function explained
11:50 – Verifying fetched data in console
13:10 – Next video update