A user of my extension weewx-GTS reported an error in a call of genSql()
from manager.py. The original line is:
for _result in db_manager.genSql(
"SELECT `dateTime`,`usUnits`,"
"`outTemp`,`outHumidity`,`pressure`"
"from %s WHERE dateTime>? AND dateTime<=?"
"ORDER BY `dateTime`"
% db_manager.table_name,timespan):
...
He claimed that he had to change that line for use with MySQL to:
for _result in db_manager.genSql( "SELECT
`dateTime`,`usUnits`,`outTemp`,`outHumidity`,`pressure` from %s WHERE
dateTime> %d AND dateTime<= %d ORDER BY `dateTime`" %
(db_manager.table_name,timespan.start,timespan.stop)):
Those 2 question marks are always used throughout WeeWX. So I do not
understand why it causes an error in this case.
Some hints?
--
You received this message because you are subscribed to the Google Groups
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-development/6cfe6767-9a4a-48cd-a8ed-c593f5aa57ccn%40googlegroups.com.