[PLUG] Raspbian sqlite project...
Jonas Augusto
jonas.agx at gmail.com
Wed Mar 22 04:14:05 UTC 2017
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
On 21 Mar 2017 21:03, "Michael Christopher Robinson" <
michael at robinson-west.com> wrote:
> I'm wondering how to count the number of rows in the database I'm
> creating from a C program. The database has a row number or Id that
> is the primary key. I need to know how many rows there are to know the
> next row number so I can add more temperatures to the database. I'm
> developing on a Raspberry Pi 3 Model B 2016. I have six USB
> temperature sensors hooked up that I read from in a loop. I generate a
> timestamp using time.h and step through the six sensors. Each sensor
> has an internal temperature and an external temperature.
>
> Table is like so:
>
> id, sensor, timestamp, temp_inner, temp_outer.
>
> With data types:
>
> Integer, Integer, Integer, float, float.
>
> If I can't get a row count in the C program, I have to pass it in every
> time I do another round of readings. I'm using sqlite3.h for database
> access and manipulation.
>
> I've been trying to answer this question on my own, but finding sample
> C code that does this is not proving to be easy.
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
More information about the PLUG
mailing list