[PLUG] Raspbian sqlite project...

Michael Christopher Robinson michael at robinson-west.com
Wed Mar 22 05:27:35 UTC 2017


On Tue, 2017-03-21 at 21:18 -0700, Jonas Augusto wrote:
> Once you have the command line client running you can count the rows
> from a
> table with this query:
> 
> SELECT Count(*) FROM tblName
> 
> Please change the table name at the end (tblName)
> 
> On 21 Mar 2017 21:14, "Jonas Augusto" <jonas.agx at gmail.com> wrote:
> 
> You can use the command line client for SQLite: https://www.sqlite.
> org/cli.html
> 
> Once it is connected to your database it is simple to make a SQL
> query. If
> you don't know how the query language works I can help you.
> 
> Jonas

I don't think I want to be doing this manually.  I need to find out the
row count in the C program so I can continue adding temperature data.
This is the program that actually probes the sensors, it needs to do
it's work quietly.  Want to be able to open the database, get the row
count, and continue adding rows to it.  I appreciate the suggestion on
the SQL statement I need, I just need to figure out how to use that
statement in C and what it returns?  I think you get an array back
instead of an int, but there is an int in the array?



More information about the PLUG mailing list