Product Catalogue
<%= catname %>
<% If not rs.eof then
set rrs = server.createobject("adodb.recordset")
%>
% OpenDB() id = request("id") cid =request("cid") if not isnumeric(id) then response.end end if if not isnumeric(cid) then response.end end if 'sql = "select * from categories where catid = "&cid&"" 'rs.Open sql,conn,1,1 'If not rs.eof then ' catname = rs("categoryname") 'End If 'rs.close sql = "select products.*, categoryname from products left join categories on products.cid = categories.catid where productid = "&id&"" rs.Open sql,conn,1,1 catname = rs("categoryname") %>