I have a menu where each link looks like this:
<li ><a href="../intranet/index.cfm?id=146">Current Projects</a></span></li>
I want to be able to use the id in the link to identify the title in the
database so i can see the date the linked page was created on. Is there someway
I can say something like:
Check the database for the hardcoded id in the link and pull back the date
colum?
The reason for this is that if the date created is today the style applied to
the link would be different.
Dan Bracuk - 28 Aug 2006 13:13 GMT
sid.wing@gmail.com - 29 Aug 2006 09:06 GMT
csber3,
You can retrieve the hardcoded link by calling the URL variable scope.
In this case,
#URL.id# would return the value "146"...
Then you can use a <cfquery> to pull that from your data table...
Example:
<cfquery name="getMyDate" datasource="MyDataSource">
SELECT MyDateColumn
FROM tblMyTable
WHERE fldMyRecordID = #URL.ID#
</cfquery>
> I have a menu where each link looks like this:
>
[quoted text clipped - 9 lines]
> The reason for this is that if the date created is today the style applied to
> the link would be different.
sid.wing@gmail.com - 29 Aug 2006 10:02 GMT
csber3,
You can retrieve the hardcoded link by calling the URL variable scope.
In this case,
#URL.id# would return the value "146"...
Then you can use a <cfquery> to pull that from your data table...
Example:
<cfquery name="getMyDate" datasource="MyDataSource">
SELECT MyDateColumn
FROM tblMyTable
WHERE fldMyRecordID = #URL.ID#
</cfquery>
> I have a menu where each link looks like this:
>
[quoted text clipped - 9 lines]
> The reason for this is that if the date created is today the style applied to
> the link would be different.