04. marts 2005 - 12:45Der er
8 kommentarer og 1 løsning
statistik sidste 7 dage
Hej Eksperter
Har et lille stk kode der henter de mest populære produkter - det virker fint!
Mit problem er at det henter alle data fra statistik-tabellen.. det skal kun hente fra de sidste 7 dage :o)
--------------------------------------------------------------------- Set rs = conn.Execute("select product_id, count(product_id) as antal from produkt_statistik group by product_id order by antal desc") ---------------------------------------------------------------------
melder fejl: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.0.18-standard-log]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 '('d',-7,now()) group by product_id order by antal desc' at line
/admin/files/file_2.asp, line 86
---------------------------------------------------------------------------------------- Set rs = conn.Execute("select product_id, count(product_id) as antal from produkt_statistik where dato >= dateadd('d',-7,now()) group by product_id order by antal desc") ----------------------------------------------------------------------------------------
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.