Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Date Functions Don't work

phpMyEdit General     Date Functions Don't work
Post new topic   Reply to topic    
 
Craig     Joined: 10 Aug 2009   Posts: 2  
Post Posted: 2009-08-10 01:10
Back to top  Reply with quote     

When creating/Editing a record in this program for a date field it displays it in a greyed out box saying "CURRENT_TIMESTAMP" but when it saves the record it completely fails and saves it as 0000-00-00 00:00:00

I don't want a calendar script since this is an added date and the user is to have no control over. Why doesn't this work?

 
doug     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2009-08-11 16:39
Back to top  Reply with quote     

It would be helpful if you would post the code from your script along with the MySQL table schema.

If it's a TIMESTAMP column as opposed to DATETIME, DATE, or TIME field, the following example might work for you.

Code:
$opts['fdd']['updated'] = array(
  'default'    => 'CURRENT_TIMESTAMP',
  'overwrite'      => 'R',
  'maxlen'     => 19,
  'name'       => 'Updated',
  'options'    => 'VD',
  'select'     => 'T',
  'size'       => 19,
  'sqlw'       => 'TRIM("$val_as")',
  'sort'       => true
);


 
Craig     Joined: 10 Aug 2009   Posts: 2  
Post Posted: 2009-09-09 21:46
Back to top  Reply with quote     

Sorry for the delay. I just wanted to say thanks. That worked great. Much appreciated.

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy