Counting SQL results aswell as outputting the result data

JanuszQ

New Member
What i try to do is, counting my rows in this SQL statement, as well as want to retrieve the data into the \[code\]Repeater\[/code\]. This is \[code\]ASP.NET\[/code\] / \[code\]C#\[/code\].\[code\]SELECT COUNT(*) AS 'numbersOfOrdres' FROM customers INNER JOIN orders ON customers.customer_id = orders.order_customer_id\[/code\]Doesn't seems to work, i'll keep getting the error \[code\]"Does not contain 'THEN MY FIELD NAME'\[/code\] in the Repeater.EDIT:Repeater code\[code\]<asp:Repeater ID="customerOrdersRepeater" runat="server"><HeaderTemplate> <table> <tr> <td><b>Customer name</b></td><td><b>Customer adresse</b></td><td>Numbers of orders</td> </tr></HeaderTemplate><ItemTemplate> <tr> <td><%# Eval("customer_name") %></td><td><%# Eval("customer_adresse") %></td><td><%# Eval("numbersOfOrdres") %></td> </tr></ItemTemplate><FooterTemplate> </table></FooterTemplate>\[/code\]
 
Back
Top