Count QSqlquery results!!
-
wrote on 8 Jan 2012, 14:14 last edited by
hi
thanks Hostel.i tried it.so thanks Andre. Excellent answer.
;) be happy
-
wrote on 8 Jan 2012, 14:24 last edited by
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>
-
wrote on 8 Jan 2012, 14:40 last edited by
[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] -
wrote on 8 Jan 2012, 14:50 last edited by
[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] -
wrote on 8 Jan 2012, 14:56 last edited by
Yeah, there's still a little difference between reading documentation and understanding documentation...
-
wrote on 9 Jan 2012, 05:47 last edited by
hi again
Andre answer me excellent ,that's OK.
why did you reply again?be happy.
thanks all. -
wrote on 17 Jul 2014, 10:43 last edited by
Thanks for this post. I was just wrestling with this problem.
-
wrote on 4 Dec 2014, 09:32 last edited by
For anyone with the same problem, I used to get the rows length with:
@query->record().count()@
I hope may help someone.
-
wrote on 4 Dec 2014, 09:32 last edited by
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.