in reply to DBI SQL Query Question

I suggest trying to run this query interactively, but what I think is happening is that COUNT is a keyword, and that would cause a syntax error (which you don't check for...)

I'd probably re-write the query like this as I suspect the order by COUNT is what is failing.

SELECT count(*) as cnt , max(time) as MAX , min(time) as MIN , attacksignature from np_data where month=? and day=? group by attacksignature order by cnt desc

Michael