ro6er
Programmer
- Jul 1, 2003
- 76
Maybe it's because it's friday but this should work and it doesn't, it's probably something simple right? I should be able to run a simple query in a loop but for some reason I can't.. Here's my code:
<!--#include file="database.asp"-->
<!--#include file="homeheader.asp"-->
<link rel="stylesheet" href="style.css" media="all" type="text/css"/>
<%
mySQL = "SELECT * FROM users"
Set rs = Conn.Execute(mySQL)
Do While Not rs.EOF%>
<div class="thumbs2">
<%
response.write rs("fullname")
if rs("Locked") = "1" then
%>
<img src="images/padlock.jpg" alt="lock" />
<%else%>
<%end if%>
<br />
<%
mySQL = "SELECT * FROM Photos where AlbumCover = ""1"" AND fullname = '"&rs("fullname")&"'"
Set rsPhotos = Conn.Execute(mySQL)
%>
<a href="#">
<img src="thumbs/<%=rsPhotos("PhotoName")%>" />
</a>
</div>
<%
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
Conn.Close
Set Conn = Nothing
%>
<!--#include file="database.asp"-->
<!--#include file="homeheader.asp"-->
<link rel="stylesheet" href="style.css" media="all" type="text/css"/>
<%
mySQL = "SELECT * FROM users"
Set rs = Conn.Execute(mySQL)
Do While Not rs.EOF%>
<div class="thumbs2">
<%
response.write rs("fullname")
if rs("Locked") = "1" then
%>
<img src="images/padlock.jpg" alt="lock" />
<%else%>
<%end if%>
<br />
<%
mySQL = "SELECT * FROM Photos where AlbumCover = ""1"" AND fullname = '"&rs("fullname")&"'"
Set rsPhotos = Conn.Execute(mySQL)
%>
<a href="#">
<img src="thumbs/<%=rsPhotos("PhotoName")%>" />
</a>
</div>
<%
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
Conn.Close
Set Conn = Nothing
%>