Don't insert data on database with nextjs
Hello guys this query is working on nextjs? I execute but don't create table :/ and don't display error
when i use this Error: relation "short_link_free" does not exist await sql(
'INSERT INTO short_link_free(origin, redirect, created, ip, country, activate) VALUES ($1,$2,$3,$4,$5,$6)',
[origin, redirect, created, getIp, getCountry, activate]
) but the table is created
PD: i use import { neon } from '@neondatabase/serverless'


4 Replies
fair-rose•15mo ago
Neon
Connect a Next.js application to Neon - Neon Docs
Next.js by Vercel is an open source web development framework that enables React based web applications. This topic describes how to create a Neon project and access it from a Next.js application. To ...
fair-rose•15mo ago
And, Try to use Neon AI, If you find yourself facing any errors and even if then it don't get solved then let me know

fair-rose•15mo ago
I've already given it your problem statement and this is what it has give me back
Let me know your progress, If you already has solved it
tame-yellowOP•15mo ago
Yes , It has been working fine, what happened was that it points to the development branch that is why the data was not displayed
I have a question now, how do I receive the response from the data insertion, for example in mysql it returns the id using neon as it would be.