| Index
» Projects
» phpMyEdit
» Forum
» Date Functions Don't work |
 |
Craig
Joined: 10 Aug 2009
Posts: 2
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)
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
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
|
|
|
|