Login | |
|
 |
ASP/Ajax SQL query display assistance please - 11/7/2007 7:52:40 AM
|
|
 |
|
| |
crlaurence
Posts: 1
Score: 0
Joined: 11/7/2007
Status: offline
|
2 questions please 1) I am using the query below, and able to loop through to display each line (of which there are 910), but what else I need to to display is one additional line at the top of the report that shows the total results total count. (for this it would be 910) 2) For the column of info (catpg) the results being shown are now numbers <5 What I need is for 1 = this 2 = that 3 = other 4 = final Thank you to anyone that can assist. ------------------ sql="select prod, descr, ph_publish as publish, isnull(catpg, '') as catpg, isnull(acatpg, '') as acatpg, isnull(scatpg, '') as scatpg, agectr as date from co535.dbo.p1base inner join (select ph_product, pt_Productid, ph_publish, ph_lastchanged from productheader left join (select pt_productid from producttext where pt_type=1 and pt_reference=1 ) as a on pt_productid = ph_id where pt_productid is null and ph_publish < 5 ) as b on prod = ph_product where prod not in (select prod from co535.dbo.p1br where status='D' or status='S') and catpg like '%' or acatpg like '%' or scatpg like '%' order by catpg" Dim i i = 0 i = i + 1 do until rs.EOF response.write " <tr>" & vbCrLf response.write " <td class=help1> " & i & " </td>" & vbCrLf response.write " <td class=help1>" & rs.Fields("prod") & "</td>" & vbCrLf response.write " <td class=help1>" & rs.Fields("descr") & "</td>" & vbCrLf response.write " <td class=help1>" & rs.Fields("publish") & "</td>" & vbCrLf response.write " <td class=help1>" & rs.Fields("catpg") & "</td>" & vbCrLf response.write " <td class=help1>" & rs.Fields("acatpg") & "</td>" & vbCrLf response.write " <td class=help1>" & rs.Fields("scatpg") & "</td>" & vbCrLf response.write " <td class=help1>" & rs.Fields("date") & "</td>" & vbCrLf response.write " </tr>" & vbCrLf rs.MoveNext loop
|
|
| |
|
|
|
|
|