Forums

This topic is locked

Repeat region and Formating

Posted 19 Dec 2001 15:35:40
1
has voted
19 Dec 2001 15:35:40 Zain Magsi posted:
Hi,

I have a table in a access db for new items. I want to display all but the latest 3 news by date.
I have a date , a category, autonumber,content, columns in the table.

The current SQL looks like this:

tableprod.Source = "SELECT * FROM news ORDER BY date"

How do I achieve this?

Or

Is it possible to define how records should appear in a repeat region. Ie: the first should be Heading 1, the second should be Heading 2, The rest Heading 3 ..

Your help will be much appreciated.

Zain



Zain Magsi

Replies

Replied 20 Dec 2001 22:28:38
20 Dec 2001 22:28:38 Dennis van Galen replied:
Hi Girok,

try this:

SELECT *
FROM news
ORDER BY date DESC

Display your data in a web-table on your page...
it shows, good.
Apply a repeat region to the section that has to be repeated, our news item, set repeat to 3 times and voila.
3 latest news items !
we got them by sorting the table with latest date as first record, then we showed that record, we also showed the next two by simply repeating the show latest entry routine i just described <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

let me know if for some reason this message won't help you.

With kind regards,

Dennis van Galen
Webmaster KPN Nederland
Financial and Information Services
Replied 20 Dec 2001 22:32:57
20 Dec 2001 22:32:57 Dennis van Galen replied:
Uhhh, i think i misunderstood you there.
you want ALL items BUT the latest 3 ?
weird, probably a news-archive page, huh ?
not sure if that's at all possible without a slight adjustment on which we can select.

maybe someone who is smart knows ?
i'm just a webmaster, what do i know...

With kind regards,

Dennis van Galen
Webmaster KPN Nederland
Financial and Information Services
Replied 21 Dec 2001 10:08:54
21 Dec 2001 10:08:54 Viktor Farcic replied:
Change SQL statement to:
tableprod.Source = "SELECT * FROM news ORDER BY date DESC"

Insert this line after &lt;body&gt;:
&lt;%
tableprod.Move 3
%&gt;

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi,

I have a table in a access db for new items. I want to display all but the latest 3 news by date.
I have a date , a category, autonumber,content, columns in the table.

The current SQL looks like this:

tableprod.Source = "SELECT * FROM news ORDER BY date"

How do I achieve this?

Or

Is it possible to define how records should appear in a repeat region. Ie: the first should be Heading 1, the second should be Heading 2, The rest Heading 3 ..

Your help will be much appreciated.

Zain



Zain Magsi
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager

Edited by - vfarcic on 21 Dec 2001 10:12:40

Reply to this topic