Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
samrathMobius opened this issue Nov 20, 2024 · 3 comments

Comments

@samrathMobius
Copy link

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;

@beytob00
Copy link

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

@mika7days
Copy link

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.',
  });

@smokinjoe
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants