I use 1 record for every hour otherwise I get to much records which are not important to me.
It is simple, once a reading comes in I check if for that date/hour a record is in the database.
if not I create a new hour record with the begin- and end counter. If the record is in the database I just update the end counter field.
gjelsvik wrote:I would like som feedbackont this field-setup in the table:
id(autoincrement),timestamp(datetime), devicename(text20),type(text20),current_val(float7), total_val(float10),source(text20)
gjelsvik wrote:Theoretically it shouldnt be a problem mixing all types of readings in a database, but will it not be hard to filter out the right result in your queries when everything from temperature to lux is stored in the same two fields(start_value and end_value)?
Users browsing this forum: No registered users and 0 guests