Update:
Figured out the SQL statement to use:
SELECT count(*) FROM wxalerts WHERE event_id like '%{event_id_code}%'
On Sunday, February 6, 2022 at 3:33:36 PM UTC-5 [email protected] wrote:
> I'm attempting to count the number of times a certain string appears in a
> row/column using the following SQL statement:
>
> "SELECT count(*) FROM wxalerts WHERE event_id like (?)", [event_id_code]
>
> When I run the statement, it always returns 0.
>
> If I run the following statement, it returns the correct number of the
> string appears.
>
> "SELECT count(*) FROM wxalerts WHERE event_id like
> '%d137c21374c749704530e9a1e52cff46%'
>
> Does someone see where my issue is? Right now this is a stand alone
> python program querying a SQLite DB, but once it is functional would like
> to convert the program over to a weewx service.
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/d5a4d143-3208-416e-b873-efed2dba41fcn%40googlegroups.com.