set mail1=objConn.Execute("SELECT userID, email, username, userPass FROM tblUsers where email is not null and email<>'' and email LIKE '%@%' and inloggad > DATE_SUB(CURDATE(),INTERVAL 30 DAY) > Date()")
får jag
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.0.25-max]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '()' at line 1
set mail1=objConn.Execute("SELECT userID, email, username, userPass, inloggad FROM tblUsers where email is not null and email<>'' and email LIKE '%@%' and inloggad > ADDDATE(CURDATE(), INTERVAL 30 DAY
är inte så bra på det här med datum, men lär mig hela tiden....svårt att hitta felen :-)
set mail1=objConn.Execute("SELECT userID, email, username, userPass, inloggad FROM tblUsers where email is not null and email<>'' and email LIKE '%@%' and inloggad > DATE_SUB(CURDATE(),INTERVAL 30 DAY)")