SELECT COUNT reports no rows error
#531
Replies: 2 comments
-
|
You are probably missing an alias: countStmt := table.Threads.SELECT(
sqlite.COUNT(table.Threads.ID).AS("count"),
) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@trevlt |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I tried to get the row count of a table using this code:
However,
countStmt.QueryContext(ctx, r.db, &totalCount)is returningqrm: no rows in result set.Could you please advise on the correct usage?"
Beta Was this translation helpful? Give feedback.
All reactions