hi...
i have an error to total my products in group by
any help please .....
this is my code what is wrong?
Code:
<BODY>
<%
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open "FILEDSN=c:/dsn/MyTable_dsn.dsn"
SQL_query = "SELECT products, SUM(sales) AS Totalsales"
FROM Customer
GROUP BY products;
Set RS = MyConn.Execute(SQL_query)
WHILE NOT RS.EOF
%>
<br>
BAG: <%=RS("Total sales")%>
<br>
<%
RS.MoveNext
WEND
RS.Close
MyConn.Close
%>
</BODY>
Last edited by wirehopper; 01-28-10 at 06:48 PM.
Reason: Code tags