Forums
This topic is locked
Quote of the Day
Posted 16 Sep 2004 19:13:09
1
has voted
16 Sep 2004 19:13:09 Matt Smith posted:
Hi, Trying to put a quote of the day on my website in dreamweaver MX. I have set up a database in MS access and have 31 quotes in it. Each day i want to have a different quote come up, corresponding to each day of the month. How do i do it!
Replies
Replied 18 Sep 2004 11:58:45
18 Sep 2004 11:58:45 Rene Bandsma replied:
You can get the actual day (of the servers date/time) with the following code:
<pre id=code><font face=courier size=2 id=code>
<%=Day(Date)%>
</font id=code></pre id=code>
Make a recordset that is only selecting the data from the database when the Day(Date) is equal to the date in your database.
Somethink like: SELECT * FROM TABLE WHERE date = 'MMColParam'
And, of course, MMColParam is the code above....
<pre id=code><font face=courier size=2 id=code>
<%=Day(Date)%>
</font id=code></pre id=code>
Make a recordset that is only selecting the data from the database when the Day(Date) is equal to the date in your database.
Somethink like: SELECT * FROM TABLE WHERE date = 'MMColParam'
And, of course, MMColParam is the code above....