Adobe Dreamweaver Forums



Last 10 THreads :         GetFlashVars (Last Post : kaur.jsln@gmail.com - Replies : 0 - Views : 1 )           »          Creating PDF (Last Post : PJR - Replies : 1 - Views : 2 )           »          IE browser (Last Post : Karlhevera - Replies : 2 - Views : 4 )           »          Tag Heuer Link Womens Watch WT131C.BA0558 Recommendation DiscountWatches (Last Post : hjfakn@21cn.com - Replies : 0 - Views : 1 )           »          Creating Timetable using Datagrid (Last Post : anirudhs - Replies : 1 - Views : 3 )           »          Movado Faceto Mens Watch 0605042 Recommendation Discount Watches (Last Post : hjfakn@21cn.com - Replies : 0 - Views : 1 )           »          Contributor's Copies (Last Post : ThinkInk - Replies : 1 - Views : 3 )           »          You cannot perform this action in this region of thepage (Last Post : ThinkInk - Replies : 1 - Views : 2 )           »          Div tag on each other (Last Post : elakin - Replies : 11 - Views : 12 )           »          I'm in tears and ready to quit (Last Post : Deaf Web Designer - Replies : 75 - Views : 76 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver Php Development
 
Tags:

Reply
  #1 (permalink)  
Old 07-23-2008, 04:17 PM
Stuart_Rauh@adobeforums.com
 
Posts: n/a
Diggs:
Default Updating a timestamp with now()

I'm creating a simple form to update a specific record. I have an update transaction and a form built using the Update Record Form Wizard. Now I want to update a DATETIME field everytime the update transaction runs.

I know this is a simple question. I just don't see where to add the now() function to the update query.

Stuart
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-23-2008, 05:35 PM
shane_mosier@adobeforums.com
 
Posts: n/a
Diggs:
Default Re: Updating a timestamp with now()

Stuart,

In the Wizard, add {NOW_DT} as the default value for that timestamp field. You can make the timestamp field hidden and add that as the default value. {NOW_DT} is ADDT markup for now().

Another option is to make a timestamp field in your database table and set it to do a current timestamp on update. This will add a MySQL timestamp to a row's timestamp field everytime the row is updated.

Shane
Reply With Quote
  #3 (permalink)  
Old 07-23-2008, 05:35 PM
Stuart_Rauh@adobeforums.com
 
Posts: n/a
Diggs:
Default Re: Updating a timestamp with now()

Thanks! That's just what I needed. I wasn't even thinking of the "TIMESTAMP" option.

Stuart
Reply With Quote
  #4 (permalink)  
Old 07-24-2008, 02:38 AM
Mohiuddin_Khan_Inamdar@adobeforums.com
 
Posts: n/a
Diggs:
Default Re: Updating a timestamp with now()

hello you could simply try this..
add a new field/column to ur database row called AutoRowDate and its type as TIMESTAMP.

ALTER TABLE `MyGoodTablesNameHere`
ADD `AutoRowDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Security TimeStamp';
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 07:30 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk