next-learn icon indicating copy to clipboard operation
next-learn copied to clipboard

Chapter 6 unable to perform Executing queries as there is no file name query in the repo to paste that code

Open samrathMobius opened this issue 1 year ago • 1 comments

I tried creating the folder query and and file route.ts and pasted the code in route.ts

SELECT invoices.amount, customers.name FROM invoices JOIN customers ON invoices.customer_id = customers.id WHERE invoices.amount = 666;

samrathMobius avatar Nov 20 '24 05:11 samrathMobius

I tried creating the folder query and and file route.ts and pasted the code in route.ts

SELECT invoices.amount, customers.name FROM invoices JOIN customers ON invoices.customer_id = customers.id WHERE invoices.amount = 666;

https://github.com/vercel/next-learn/tree/main/dashboard/starter-example/app/query

beytob00 avatar Nov 20 '24 07:11 beytob00

remove the following return part from the code to perform:

return Response.json({
    message:
      'Uncomment this file and remove this line. You can delete this file when you are finished.',
  });

mika7days avatar Dec 12 '24 19:12 mika7days

@mika7days the issue is that the there is no ./query/route.ts file in the first place

I'm going through the tutorial and am running into the same problem.

Although it was a fun exercise to attempt in writing it all out myself - unfortunately I wasn't able to actually execute the SQL correctly.

smokinjoe avatar Dec 12 '24 21:12 smokinjoe

@leerob - can you close the issue?

zviedris avatar Jan 30 '25 07:01 zviedris