
August 30th, 2004, 10:24 PM
|
Registered User
|
|
Join Date: Aug 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Database answer
Hey calebrw:
Try this:
<!--create a variable to hold the current month -->
<cfset cMonth = #Month(Now())#>
<--!Create a query to retrieve news from the database-->
<cfquery name="anyName" datasource="yourDBName">
SELECT news id, title, body , month (whatever you want to display)
FROM news
WHERE month = '#cMonth#'
ORDER BY yourChoice
</cfquery>
NOTE: The query will only retrieve news that meet the criteria determined by the "WHERE" statement. In this case, the current month.
|