Hi, I have a problem quering by name as I have identical names. Its fine when I query by category or postcardid but when you click their link which is queried by name of course the query cannot distinguish between them and so goes to the first record under that name.
Is there a way to query that says 'where "artist" = the postcard of that artist' and therefore unique?
Any suggestions would be great
Thanks
Richard
Is there a way to query that says 'where "artist" = the postcard of that artist' and therefore unique?
Any suggestions would be great
Thanks
Richard
Code:
description=Request("artist")
If description <> "" Then
Set connPostCardSoft=Server.CreateObject("ADODB.Connection")
connPostCardSoft.Open PostCardSoftConnectString
Set rsCard=Server.CreateObject("ADODB.Recordset")
rsCard.CursorLocation = 3
SQLQuery="Select tblGreetingcategories.categoryname,tblGreetingPostCards.categoryid,tblGreetingPostCards.downloadsix,tblGreetingPostCards.titleimageeight,tblGreetingPostCards.titleimagesix,tblGreetingPostCards.largeimageseven,tblGreetingPostCards.mediumimagesix,tblGreetingPostCards.priceimagesix,tblGreetingPostCards.dimensionssix,tblGreetingPostCards.yearimagesix,tblGreetingPostCards.largeimagesix,tblGreetingPostCards.PostCardID,tblGreetingPostCards.DefaultHeadline,tblGreetingPostCards.CardDescription,tblGreetingPostCards.artist,tblGreetingPostCards.gallery,tblGreetingPostCards.newimageseven,tblGreetingPostCards.titleimagesix,tblGreetingPostCards.titleimageseven,tblGreetingPostCards.DefaultMessage,tblGreetingPostCards.Author,tblGreetingPostCards.PictureURL,tblGreetingPostCards.ThumbnailURL,tblGreetingPostCards.dimensionsseven,tblGreetingPostCards.ExtraThree,tblGreetingPostCards.downloadseven,tblGreetingPostCards.NewImageOne,tblGreetingPostCards.NewImagetwo,tblGreetingPostCards.NewImageThree,tblGreetingPostCards.NewImageFour,tblGreetingPostCards.NewImageFive,tblGreetingPostCards.NewImageSix,tblGreetingPostCards.NewImageSeven,tblGreetingPostCards.NewImageEight,tblGreetingPostCards.BackgroundImageURL,tblGreetingPostCards.ThumbnailHTML from tblGreetingcategories,tblGreetingPostCards Where tblGreetingcategories.categoryid = tblGreetingpostcards.categoryid and artist='" & description & "' and tblGreetingpostcards.CategoryID <> " & 60 & " and tblGreetingpostcards.CategoryID <> " & 63 & " Order By BackgroundImageURL DESC"
rsCard.Open SQLQuery, connPostCardSoft
rsCard.PageSize = 2
intPageCount = rsCard.PageCount
If rsCard.EOF=True Then
Response.Write "<p>No artists found in database for this category."
Response.End
End If
End If
Comment