| Index
» Projekty
» phpMyEdit
» Fórum
» Basic field value replacement |
 |
jonrico
Založený: 31.08.2009
Príspevky: 1
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)
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
|
|
|
|