On 16 Oct 2011, at 1:21pm, Fabian wrote:

> 2011/10/16 Frank Missel <i...@missel.sg>
> 
>> What do you want to attain with the count?
> 
> I want to allow users to paginate through a result set. The pages are
> retreived through LIMIT/OFFSET, but to calculate the total number of pages,
> I have execute a separate COUNT() query (without LIMIT) once.

You're using a programming language.  So do this:

numberOfRows = SELECT count(*) FROM myTable
if (numberOfRows > 100) then numberOfRows = 100

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to