![]() ![]() |
More Gear Reviews: <% Set conn = Server.CreateObject("ADODB.Connection") conn.Open "Driver={SQL Server};Server=216.211.131.97;Database=MountainZone;uid=mtn;pwd=Z0n3" SQL = "SELECT Reviews_Products.Product_ID, Reviews_Products.Product_Name, Reviews.* FROM Reviews_Products INNER JOIN Reviews ON Reviews_Products.Product_ID=Reviews.Product_ID WHERE Reviews.Product_ID='" & request("Product_ID") & "' ORDER BY Reviews.SubmittedDate DESC" set RS = conn.Execute(SQL) SQLCount = "SELECT Count(*) AS ReviewCount FROM Reviews WHERE Product_ID = '" & request("Product_ID") & "'" set RSCount = conn.Execute(SQLCount) SQLAverage = "SELECT AVG(Rating) AS AverageStars FROM Reviews WHERE Product_ID = '" & request("Product_ID") & "'" set RSAverage = conn.Execute(SQLAverage) %> <% If RS.EOF then %> Nobody has reviewed this product yet. You can be the first by &Product_ID=<%= Request("Product_ID") %>">clicking here. <% Else %>
<% RS.MoveNext Loop %> <% End If %> | |||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||