Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping several entries in the same <div> 1

Status
Not open for further replies.

macmonteiro

Programmer
Oct 24, 2002
35
BR
Hi. I've built my own ASP blog and it works fine, thanks.
There's just one thing that I couln't do anyway.
Look at this code:
-------------------------------------
response.write &quot;<table name='posts' width='95%'>&quot;
For i=1 to 18
response.write &quot;<tr>&quot;
response.write &quot;<td style='border-style: dashed; border-width: 1px' align='left' bgcolor='#e6e6e6'>&quot;
response.write &quot;<b>&quot;&LogRec(&quot;weekday&quot;)&&quot;</b>&nbsp;&nbsp;||&nbsp;&nbsp;&quot;&LogRec(&quot;date&quot;)
response.write &quot;</td>&quot;
response.write &quot;</tr>&quot;
response.write &quot;<tr>&quot;
response.write &quot;<td style='border-style: nonenone; border-width: 1px' align='left'>&quot;
response.write &quot;</b></center><p>&quot;&LogRec(&quot;body&quot;)&&quot;<p>&quot;
response.write &quot;<i><b>Posted by&nbsp;<font color='red'>&quot;&LogRec(&quot;blogger&quot;)&&quot;</font></b></i>&quot;
response.write &quot;<div align='right'><a class='links' href='com_1.asp?id_log=&quot;&LogRec(&quot;id&quot;)&&quot;'>Commente this post</a></div>&quot;
response.write &quot;</font>&quot;
response.write &quot;</td>&quot;
response.write &quot;</tr>&quot;
LogRec.MoveNext
Next
----------------------------------------
It displays something like:

____________________
| Friday, 10/11/02 |
POst #3 here
____________________
| Friday, 10/11/02 |
Post #2 here
____________________
| Friday, 10/11/02 |
Post #1 here

Do you see?
I'd like yto have a selection that fetched all the posts from one day inside the same TD.
May be there's something to change into my database. I dunno.
But it's mostly a logical problem :::::: The worst is that my English is poor and I don't think I have explained it clearly.
I hope someone can help me.
Bye
 
Hope this is what you were looking for...

Code:
if not logRec.EOF then
	thisDay = LogRec(&quot;date&quot;)
	response.write &quot;<tr>&quot;
	response.write &quot;<td style='border-style: dashed; border-width: 1px' align='left' bgcolor='#e6e6e6'>&quot;
		response.write &quot;<b>&quot;&LogRec(&quot;weekday&quot;)&&quot;</b>  ||  &quot;&LogRec(&quot;date&quot;)
	response.write &quot;</td></tr>&quot;		
end if

do while not logRec.EOF
	if  LogRec(&quot;date&quot;) <> thisDate then
		thisDay = LogRec(&quot;date&quot;)
		response.write &quot;</td></tr><tr>&quot;
		response.write &quot;<td style='border-style: dashed; border-width: 1px' align='left' bgcolor='#e6e6e6'>&quot;	
            response.write &quot;<b>&quot;&LogRec(&quot;weekday&quot;)&&quot;</b>  ||  &quot;&LogRec(&quot;date&quot;)
        response.write &quot;</td></tr>&quot;		
	end if
    response.write &quot;<tr>&quot;
        response.write &quot;<td style='border-style: nonenone; border-width: 1px' align='left'>&quot;
            response.write &quot;</b></center><p>&quot;&LogRec(&quot;body&quot;)&&quot;<p>&quot;
            response.write &quot;<i><b>Posted by <font color='red'>&quot;&LogRec(&quot;blogger&quot;)&&quot;</font></b></i>&quot;
            response.write &quot;<div align='right'><a class='links' href='com_1.asp?id_log=&quot;&LogRec(&quot;id&quot;)&&quot;'>Commente this post</a></div>&quot;
            response.write &quot;</font>&quot;
        response.write &quot;</td>&quot;
    response.write &quot;</tr>&quot;
	logRec.movenext
LOOP
 
Thank you, man
I'm not sure I will use it just like you did, but now I think it's really easier than I thought.
A star for you!
 
hey, mwolf00, maybe you'd like to see how I did it:
-----------------
response.write &quot;<table name='logs' width='60%'>&quot;
For i=1 to 20
ThisDate=LogRec(&quot;date&quot;)
response.write &quot;<tr>&quot;
response.write &quot;<td style='border-style: dashed; border-width: 1px' align='left' bgcolor='#e6e6e6'>&quot;
response.write &quot;<b>&quot;&LogRec(&quot;weekday&quot;)&&quot;</b>&nbsp;&nbsp;||&nbsp;&nbsp;&quot;&LogRec(&quot;date&quot;)
response.write &quot;</td>&quot;
response.write &quot;</tr>&quot;
response.write &quot;<tr>&quot;
response.write &quot;<td>&quot;
Do while not ThisDate<>LogRec(&quot;date&quot;)
response.write LogRec(&quot;body&quot;)&&quot;<p>&quot;
response.write &quot;<div align='left'><a class='links' href='com_1.asp?id_log=&quot;&LogRec(&quot;id&quot;)&&quot;'>Comment this post</a></div><p>&quot;
LogRec.Movenext
Loop
Next
---------------------------
thanx for the advice!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top