Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
oahu9872
Posting Yak Master
112 Posts |
Posted - 2006-01-31 : 16:02:05
|
| I am trying to build a thumbnail gallery of images stored in a database. I'd like them to come out of the database and into a table with 5 columns and after the fifth column start a new row. I'm not sure how to get it to move to the next row after 5 columns. any help would be appreciated. thanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-01-31 : 16:03:44
|
| Could you provide a data example?Tara Kizeraka tduggan |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
oahu9872
Posting Yak Master
112 Posts |
Posted - 2006-01-31 : 16:14:52
|
| I have a field of pictures named MSA1.jpg, MSA2.jpg, MSA3.jpg, .... MSA400.jpg. I'd like it to go into a table so it does the following...Row 1Column 1 - MSA1.jpgColumn 2 - MSA2.jpgColumn 3 - MSA3.jpgColumn 4 - MSA4.jpgColumn 5 - MSA5.jpgthen go to row 2, etc. all the way through the 400 pictures. is that possible to do that? i hope that helps |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-01-31 : 16:18:41
|
| Why would you want to do this? Each image should be in its own row.Tara Kizeraka tduggan |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-01-31 : 16:20:49
|
| This is not a database question, but a question for ASP or HTML or whatever you are using to present this data.What tool are you using to query the database and to create the webpage? (i..e, ASP.NET) |
 |
|
|
oahu9872
Posting Yak Master
112 Posts |
Posted - 2006-01-31 : 16:25:37
|
| The reason I'm doing this is I'm trying to build a thumbnail gallery and the images will come from a database. I need 5 column rows. Anyway, I finally got it to work. This is how I did it if anyone is interested. Thanks for the help. <% Dim columnConst COLUMN_COUNT = 3 ' column = 0 ' Do While Not rsPics.EOF If column = 0 Then Response.Write "<TR>" Response.Write "<TD>" & _ RsPics("FileName") & "</TD>" column = column + 1 If column = COLUMN_COUNT Then Response.Write "</TR>" & vbNewLine column = 0 ' start over! End If RsPics.MoveNext Loop If column <> 0 Then For c = column To COLUMN_COUNT Response.Write "<TD>???</TD>" Next Response.Write "</TR>" & vbNewLine End If %> |
 |
|
|
|
|
|