Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Basic field value replacement

phpMyEdit General     Basic field value replacement
Post new topic   Reply to topic    
 
jonrico     Joined: 31 Aug 2009   Posts: 1  
Post 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)
Post 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    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy