How do you get the values of a query? #2063
Answered
by
DanielCoder834
DanielCoder834
asked this question in
Q&A
-
I am trying to do a select call to see if a user exists.
I am not entirely sure how to get the values from the query. I tried using res.Values() instead of res.RawValues(), but the server crashed. EDIT: I figured it out. You need to do something like this:
|
Beta Was this translation helpful? Give feedback.
Answered by
DanielCoder834
Jun 26, 2024
Replies: 1 comment
-
... |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
DanielCoder834
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
...
var value int64
dbpool.db.QueryRow(ctx, query, args).Scan(&value)
...