It's standard to have "entry date" and/or "last modified date" columns in 
certain tables.
I just want to add that there's no need to pass the timestamp from the front 
end into the database.  Rather, use the database's timestamp function [e.g. 
Now()] in your SQL statement, or use a trigger.
-David

On Sunday, March 18, 2001 6:33 AM, Bernd VanSkiver 
[SMTP:[EMAIL PROTECTED]] wrote:
> Ya, could be fairly simple if it was an Access database, but it is SQL.
> Guess I'm going to have to just stick a column in a table and have the
> update queries modify that date whenever they make a change to the db.  Was
> just hoping for an easy automatic way.
>
>
> ----Original Message Follows----
> From: "Bob Silverberg" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: CF-Talk <[EMAIL PROTECTED]>
> Subject: RE: last updated
> Date: Sun, 18 Mar 2001 09:04:16 -0500
>
> If you're talking about an Access database, and all you want is the last
> date modified for the mdb file, use the CFDIRECTORY tag.  It can read a
> directory and return info on files in that directory.  If you only have one
> mdb file in the directory you can use the filter= attribute so that you
> don't have to loop through the query to find the right record.
>
> Here's an example:
> <cfdirectory action="LIST" directory="C:\MyDirectory" name="qryDir"
> filter="*.mdb">
>
> <cfoutput>
> #qryDir.DateLastModified#
> </cfoutput>
>
> If you can't be sure of returning only one record, you can change it to:
>
> <cfoutput>
> <cfif qryDir.Name EQ "Mydb.mdb">
>       #qryDir.DateLastModified#
> </cfif>
> </cfoutput>
>
> Of course, you could parameterize the file name - heck, you could even make
> it into a pretty simple custom tag!
>
> Bob
>
> -----Original Message-----
> From: Bernd VanSkiver [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 17, 2001 11:49 PM
> To: CF-Talk
> Subject: last updated
>
>
> Is there a way for cf to see when a certain database was last modified?
> Wanting to show last updated date to site content and product information on
> front page and think being able to see when the database was last modified
> would be the easiest way to do it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to