Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Location
    Belgium, Leuven
    Posts
    145

    sqlite3: count records

    Hi all, I tried this but this does not work:

    Code:
    totalrecords=db:exec("SELECT COUNT(*) AS id FROM table")
    Does anybody how to count records without making a loop & a counter. The table I need to query is really big.

    thanks

    gert

  2. #2
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    select sum(1) as RecordCount
    would work too -- but you shouldn't have to scan thru any records -- should be just a single record.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  3. #3
    Join Date
    Nov 2004
    Location
    Belgium, Leuven
    Posts
    145
    thanks Jassing!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts