$q0 = "select rev_timestamp from ".$revTable." where rev_page=".$pageId." order by rev_timestamp asc limit 1";
if(($res0 = mysql_query($q0)) && ($row0 = mysql_fetch_object($res0)))
{
$timestamp=$row0->rev_timestamp;
//add this line to make the timestap more readable
$ret = $wgLang->timeanddate( wfTimestamp(TS_MW, $timestamp), true );
//$ret='coucou';
}