Next.js Discord

Discord Forum

Drizzle selects throws and error

Answered
JChicano posted this in #help-forum
Open in Discord
Hello, i have this query than combine two, when i launch the page the query works well, but in the code it throws this error, bcs the method "inArray" doenst allow a dinamic array, so i think i have to do another query with the same result to fix this, can some1 help me 😄
Answered by JChicano
doing a method with all the situations, and calling it
View full answer

19 Replies

if i put "const valores =['Ford', 'GM']", and i pass "valores", still not working, and this obviously cant be empty
and this is the documentation on this method, im using the second example, but there on the first query is not used "await"
if i remove the "await" of the first query the error is fixed, but the query gives and empty array bcs the first one in not done when the second one is going to do, idk if im explaining well 😅
Can you try by creating a static array like const abc = ['item', 'item2'] as const?

Else, as I mentioned: share the error.
@JChicano Click to see attachment
this is the error
@JChicano this is the error
It looks more like a documentation…
I am looking for this one
its ok, i did a "patch" and its working so fuck it xd
What’s your „patch“?
doing a method with all the situations, and calling it
Answer
and not the method "inArray" is working without errors bcs it recives the data manually
Oh wow, that’s nasty code.. yea. Whatever. If you fine with that, then use it. By the way: it is easily possible to have an dynamic array for „inArray“ search
i know and the way i have it worked well and it was easier, but with this way i dont have errors so is ok for me 😅
@B33fb0n3 Btw, do you know about how to enable a domain custom domain in vercel, that i have in cloudflare and do this aswell, bcs i not getting it :thinq: