Fejlen: -------------------------------------------------------------------------------------- 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 '(antal) as totalantal, produkt_id from ordre_linjer group by pr
/admin/files/file_2.asp, line 50 --------------------------------------------------------------------------------------
Linje 50: -------------------------------------------------------------------------------------- Set rs = conn.Execute("select sun(antal) as totalantal, produkt_id from ordre_linjer group by produkt_id order by totalantal desc") --------------------------------------------------------------------------------------
Koden: -------------------------------------------------------------------------------------- sql = "select sun(antal) as totalantal, produkt_id from ordre_linjer group by produkt_id order by totalantal desc"
Set rs = conn.Execute("select sun(antal) as totalantal, produkt_id from ordre_linjer group by produkt_id order by totalantal desc")
do while not rs.EOF response.write rs("produkt_id") & " antal " & rs("totalantal") & "<br>" rs.Movenext loop --------------------------------------------------------------------------------------
Må også nok sige at jeg ikke lige kendte sun udtrykket ;o)
Synes godt om
Ny brugerNybegynder
Din løsning...
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.