On 26 Jun 2012, at 11:28am, "[email protected]" <[email protected]> wrote:

> I want to retrieve the number of records in a table,
> but dont know how to get access to the result of  " select count(*) from 
> tablename "

That statement, like any other SELECT command, will return a set of rows and 
columns with the result in.  In this case, it will return just one row, 
containing just one column, which has the number you asked for in.

Use sqlite3_step(stmt) to get the row.

Use sqlite3_result_int(stmt, 0) to get the value of the first (only) column of 
the row.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to