Couple of things. I'm using the following:
<%
dim adoVu
dim strUser
strUser=Session("UserID")
strVu = "SELECT * FROM FavVenues WHERE UsrID=" & strUser
set adoVu = adoCn.Execute(strVu)
%>
<% Do While Not adoVu.EOF%>
VenueID=<%=adoVu("VenID")%>
<%adoVu.MoveNext
Loop%>
to give me an output (bit above in Italics) of VenueID=6
Which I want to be included here:
<%
dim adoVn
strVn = "SELECT * FROM Venues Where VenueID=6 OR VenueAddedBy=" & strUser
set adoVn = adoCn.Execute(strVn)
%>
The above works using VenueID=6 as a fixed variable.
Couple of issues how do I include the first set of code in the above SELECT statement and the other thing is I actually want VenueAddedBy=" & strUser first with OR VenueID=6 after - basically you can have more that one venue so it could be OR VenueID=6 OR VenueID=9 etc so I intend on adding OR in the loop. At the moment when I try and do it the other way round, or do a ORDER BY statement after "& strUser I get errors.


Reply With Quote
Bookmarks