<% varCatID = request.querystring("catID") 'if doesn't select default or blank category then IF varCatID <> "" AND varCatID <> 0 THEN strImgSQL = "SELECT photoID, photoCat, photoFileSM " _ & "FROM tblCat INNER JOIN tblPhotos ON tblCat.catID = tblPhotos.photoCat "_ & "WHERE photoCat = " & varCatID & "" SET objImgRS = Server.createObject("ADODB.recordset") objImgRS.open strImgSQL , "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/access_db/cRodriguez.mdb") & ";" %> <% 'loop through all records in database objImgRS.MoveFirst DO WHILE NOT objImgRS.EOF IF objImgRS.EOF THEN response.write "" ELSE response.write "" 'set the number of columns FOR x = 1 TO 4 IF objImgRS.EOF THEN EXIT FOR response.write "" objImgRS.MoveNext NEXT response.write "" END IF LOOP objImgRS.Close SET objImgRS = Nothing END IF IF varCatID = 0 THEN response.write " " END IF %>
There are no images for this category