B
Billy Barth
I am trying to loop through my database to display a picture. That is
no problem. Where I hit a snag is this. I only want three pictures
then break to a new row and three more, etc. Any ideas?
What this does is display one record. Any Help would be appreciated
Below is my code.
<%
strSQL="SELECT DISTINCT Kids.kids_Id AS Kids, kids_pics.kids_ID AS
kids_pics_kids_ID,pic_name,first_Name,kids_Desc,kids_Age FROM Kids
INNER JOIN kids_pics ON Kids.kids_Id = kids_pics.kids_ID "
Set rsk = CreateObject("ADODB.Recordset")
rsk.Open strSQL, con, adOpenStatic, adLockReadOnly
%>
<h1>Waiting Children</h1>
<%
count=count+1
if rsk.eof then error
if not rsk.eof and count>=3 then
count=0%>error
<%else%>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" width="81"><img src="images/kids_photos/<
%=rsk("pic_name")%>" alt="Featured Child" /></td>
</tr>
<tr>
<td align="center" width="81"><%=rsk("first_Name")%></td>
</tr></table>
<%end if%>
no problem. Where I hit a snag is this. I only want three pictures
then break to a new row and three more, etc. Any ideas?
What this does is display one record. Any Help would be appreciated
Below is my code.
<%
strSQL="SELECT DISTINCT Kids.kids_Id AS Kids, kids_pics.kids_ID AS
kids_pics_kids_ID,pic_name,first_Name,kids_Desc,kids_Age FROM Kids
INNER JOIN kids_pics ON Kids.kids_Id = kids_pics.kids_ID "
Set rsk = CreateObject("ADODB.Recordset")
rsk.Open strSQL, con, adOpenStatic, adLockReadOnly
%>
<h1>Waiting Children</h1>
<%
count=count+1
if rsk.eof then error
if not rsk.eof and count>=3 then
count=0%>error
<%else%>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" width="81"><img src="images/kids_photos/<
%=rsk("pic_name")%>" alt="Featured Child" /></td>
</tr>
<tr>
<td align="center" width="81"><%=rsk("first_Name")%></td>
</tr></table>
<%end if%>