Count QSqlquery results!!
-
hi
thanks Hostel.i tried it.so thanks Andre. Excellent answer.
;) be happy
-
You should write something:
@
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
@P.S. Use <code>int numRowsAffected()</code>
-
[quote author="abbas farahmand" date="1326023459"]I'm using mysqli . support it?
if no , how can i get the size or number of row in results?i used
@query.numRowsAffected()
@
too
but its not worked![/quote][quote author="tucnak" date="1326032692"]You should write something:
@
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
@P.S. Use <code>int numRowsAffected()</code>[/quote]
Conclusion:
[quote]
I will read previous posts before replying.
...
[/quote] -
[quote author="tucnak" date="1326032692"]You should write something:
@
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
I will read documentation.
@P.S. Use <code>int numRowsAffected()</code>[/quote]
Let me now think about your proposal and read the numRowsAffected documentation:
[quote]
Returns the number of rows affected by the result's SQL statement, or -1 if it cannot be determined. Note that for SELECT statements, the value is undefined; use size() instead.
[/quote] -
Yeah, there's still a little difference between reading documentation and understanding documentation...
-
hi again
Andre answer me excellent ,that's OK.
why did you reply again?be happy.
thanks all. -
Thanks for this post. I was just wrestling with this problem.
-
For anyone with the same problem, I used to get the rows length with:
@query->record().count()@
I hope may help someone.
-
For anyone with the same problem, I used to get the rows length with:
@query->record().count()@
I hope may help someone.
-
Hi and welcome to devnet,
Row length and row count are not the same thing. The row length is the number of field in the row, while the row count is the number of row returned by your query.
-
Hi and welcome to devnet,
Row length and row count are not the same thing. The row length is the number of field in the row, while the row count is the number of row returned by your query.