Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Date Functions Don't work

phpMyEdit General     Date Functions Don't work
Odoslať novú tému   Odpovedať na tému    
 
Craig     Založený: 10.08.2009   Príspevky: 2  
Príspevok Zaslal: 2009-08-10 01:10
Návrat hore  Odpovedať s citátom     

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     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2009-08-11 16:39
Návrat hore  Odpovedať s citátom     

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.

Kód:
$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     Založený: 10.08.2009   Príspevky: 2  
Príspevok Zaslal: 2009-09-09 21:46
Návrat hore  Odpovedať s citátom     

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

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov