So, I'm trying to build a console application to put my IIS log files into a MySQL database for later browsing via an ASP.NET page. I have everything working fine when I try to do a select all type statement, but when I try to do select all records from after a certain date logparser seems to ignore the 'where' clause and gives me all records. Here's the code I'm using (it's in c#)
String query = "SELECT TO_TIMESTAMP(date,time) AS thedatetime, c-ip, s-ip, cs-method, cs-uri-stem FROM " + thisfolder + "ex*.log WHERE thedatetime > TO_TIMESTAMP('" + maxdate + "','yyyy-MM-dd hh:mm:ss')";
'thisfolder' is a valid folder
maxdate is a date / time in the correct format.
This query should (as far as I can tell) only give me records where the date / time is later than the date / time specified in maxdate. It doesn't, it gives me all records.
Help please!