| Index
» Projects
» phpMyEdit
» Forum
» Basic field value replacement |
 |
jonrico
Joined: 31 Aug 2009
Posts: 1
Posted: 2009-08-31 20:58
Back to top
Reply with quote
|
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
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2009-09-02 13:47
Back to top
Reply with quote
|
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
|
|
Post new topic
Reply to topic
|
|
|
|