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  »  Basic field value replacement

phpMyEdit General     Basic field value replacement
Odoslať novú tému   Odpovedať na tému    
 
jonrico     Založený: 31.08.2009   Príspevky: 1  
Príspevok Zaslal: 2009-08-31 20:58
Návrat hore  Odpovedať s citátom     

Hello

I am sorry I cant seem to work this out by myself. I have tried searching the forums and reading the docs. I have a simple database table with a long value stored in it to represent a date/time.

When data is displayed by phpMyEdit I want to reformat this long value into a usable date.

I figured I would do that in PHP by adding a php key to the opts.

$opts['fdd']['timestamp'] = array(
'name' => 'Timestamp',
'select' => 'T',
'maxlen' => 20,
'sort' => true,
'php' =>'calcdate.php'
);

calcdate.php is called, but I cant figure out how to access the current value in it, so I cant modify it.

Basically I want a way to access the current row, current cell value inside the php expression.

Thanks in advance.

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2009-09-02 13:47
Návrat hore  Odpovedať s citátom     

MySQL has a lot of date functions, some of which you might use to alter the retrieved value.
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html

 
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