Hi, Let me state at the outset that I am a total newbie when it comes to any scripting language. I only have the barest understanding of the code itself. I have been trying to put together a database driven website as a project. I have MS Office 2000 and so I have been using MS Access for my database and MS FrontPage for my coding. The basics of what I am trying to achieve are as follows: to store a few images along with some basic descriptions as individual records in a table within the database and then have that information displayed on an .ASP page in a browser. The user would then be able to click on one of the displayed images and a new page would open with more information about that particular item. I have managed to put together the pages ok (using various pieces of code that I have found on the internet) and they do work. However I would like to amend the way the information is displayed when it is pulled from the database onto the default.asp page. Currently all of the records are displayed in a single column on the page. What I would prefer is that the records would be displayed in two columns on the default.ASP page instead of the single column that I have. Two ways of explaining it would be as follows: record no. one in the database table to be displayed at the top left of the page, record no. two directly to the right of that on the page, record number three directly below record no. one at the left of the page and so on or all the odd numbered records in the database table displayed on the left of the page and all of the even numbered records displayed on the right of the page, but in consecutive order i.e. record no. 1, 3, 5, 7, etc displayed on the left of the page and record number 2, 4, 6, 8, etc displayed on the right of the page. This layout would be a lot better for my needs. As I said already I have only the barest knowledge of scripting languages and although I might be able to grasp how the different code sequences work together I know nothing about the code syntax and therefore I am unable to make amendments to it myself. I would have no problem establishing a second column on the default.asp page in which to display the data. The problem for me is amending the code so that both columns would then be populated with the data that I want to see in them. The code that I have is as follows: <% Set cn = Server.CreateObject("ADODB.Connection") Set picsset = Server.CreateObject("ADODB.Recordset") cn.Open GetConnectString sqlselect = "SELECT Id, Year, Description, ImageWidth, ImageHeight, ThumbWidth, ThumbHeight " &_ "FROM tPhotos " &_ "ORDER BY Id" picsset.Open sqlselect, cn, adOpenStatic, adLockReadOnly, adCmdText while not picsset.EOF %> <tr> <td valign="top" width="207" height="97"> <a href="detail.asp?itemid=<%=picsset("Id")%>"> <img src="getimage.asp?field=Thumb&imgid=<%=picsset("Id")%>" width="<%=picsset("ThumbWidth")%>" height="<%=picsset("ThumbHeight")%>" alt="Image"></a> </td> <td valign="top" width="303" height="97"> <font face="Arial" size="2"> <strong>Year:</strong><br> <%=picsset("Year")%><br><br> <strong>Description:</strong><br> <%=picsset("Description")%></font> </td> Any help appreciated - MTIA Teknulpe
If you are learning from scratch dont start with classic ASP as it is a dead language. If you want scripting language then go with PHP. Better yet, go for a programming language and use ASP.Net which has a lot of built in controls to do exactly this sort of thing with only a couple of lines of code. What you need to do is create a count to determin if it is an odd or even record number, if it is even then to add the </tr><tr>