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

result->get_row_count() seems to return always 0 #26

Open
jmssil opened this issue Jul 23, 2015 · 2 comments
Open

result->get_row_count() seems to return always 0 #26

jmssil opened this issue Jul 23, 2015 · 2 comments

Comments

@jmssil
Copy link

jmssil commented Jul 23, 2015

boost::shared_ptrsqlite::result result = query.get_result();
result->get_row_count() seems to return always 0?

@vinzenz
Copy link
Owner

vinzenz commented May 7, 2018

The problem is that the name is misleading - sqlite3_changes is used to populate this information.
However this only works for INSERT, UPDATE, and DELETE - It won't give the number of rows for a query. My bad.

I will leave this open until I find a way to provide a solution to this, anyway thanks for reporting and sorry that it took 3 years to actually answer this. I don't know why I never investigated this.

@beemibrahim
Copy link

The problem is that the name is misleading - sqlite3_changes is used to populate this information. However this only works for INSERT, UPDATE, and DELETE - It won't give the number of rows for a query. My bad.

I will leave this open until I find a way to provide a solution to this, anyway thanks for reporting and sorry that it took 3 years to actually answer this. I don't know why I never investigated this.

have you fixed it yet cuz im also getting these problems

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

3 participants