This topic is locked

View date updated in list view

8/23/2010 10:29:24 AM
PHPRunner General questions
A
Astrid author

I have a field in my database called editdate. I want to be able to show my users when the database was last updated.

Is it possible to put this information somewhere on the top of the list where it captures the most recent date in the field editdate?

A
ann 8/24/2010

Astrid,
create a PHP code snippet on the Visual Editor tab.

Here is a sample code:

$rs=CustomQuery("select max(editdate) as mx from TableName");

if ($data=db_fetch_array($rs)){

echo "Last update: ".$data["mx"];

}

else {

echo "";

}
A
Astrid author 8/24/2010

Ann,

Thx! You're the best!

Kind regards,

Astrid