5 messages in com.mysql.lists.win32ASP and MySQL
FromSent OnAttachments
Andrew H. Schwarz14 Jul 2003 14:57 
Tom Achtenberg14 Jul 2003 15:17 
Joel Rees14 Jul 2003 20:27 
jbon...@sola.com.au15 Jul 2003 16:31 
Tom Achtenberg16 Jul 2003 07:07 
Subject:ASP and MySQL
From:Andrew H. Schwarz (asch@uh.edu)
Date:07/14/2003 02:57:59 PM
List:com.mysql.lists.win32

I am using ASP to access a mySQL database and have found that mySQL does not support nested select statements. How would I go about converting the following standard SQL statement to work in mySQL/ASP? Any help would be GREATLY appreciated.

Thank you, Andy

strSql = "SELECT MAX(VisitorCount) FROM (SELECT LogYear, LogMonth, LogDay, COUNT(pl_ipaddress) As VisitorCount FROM (SELECT DISTINCT YEAR(pl_datetime) AS LogYear, MONTH(pl_datetime) AS LogMonth, DAY(pl_datetime) AS LogDay, pl_ipaddress FROM " & strInstance & "PageLog WHERE pl_datetime BETWEEN " & FormatDatabaseDate(datReportStart & " 00:00:00") " AND " & FormatDatabaseDate(datReportEnd & " 23:59:59") & " ) DT_PageLog " "GROUP BY LogYear, LogMonth, LogDay)"

Set rsCount = objConn.Execute(strSql)