I am developing a component in Joomla. Through my component I want to store timestamp to "lastaccessed" field.
My problem is that, if I am simply storing the date, then MySQL is displaying it as "0000-00-00 00:00:00"
I am using the PHP date function like this:
$row->date_lastaccessed=date();
How can I store and retrieve the date in my format (dd-mm-yyyy hh:mm:ss ampm
)?