Hello,

I want to execute a SQL request on weewx.sdb inside a custom service engine.

For example, I want to know the pressure the last time the wind direction 
was recorded as NOT NULL. The suitable SQL request is :

SELECT windDir,pressure FROM archive WHERE windDir IS NOT null ORDER BY 
dateTime DESC LIMIT 1

Parsing the customization guide, I feel I can follow The 
database/Programming interface section. Well, I do not know how to 
implement exactly what I need:


wx_manager    = db_lookup()        # Get default binding
# Sample query:
wx_manager.getSql("SELECT windDir,pressure FROM %s WHERE windDir IS NOT null 
ORDER BY dateTime DESC LIMIT 1" % wx_manager.archive)



I do not know enough in Python to understand how to collect the SQL result 
i.e. the values of the fields winDir and pressure.

Any idea?

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to