Beispiel #1
0
function getReplag()
{
    $query = "SELECT UNIX_TIMESTAMP() - UNIX_TIMESTAMP(rc_timestamp) as replag FROM recentchanges_userindex ORDER BY rc_timestamp DESC LIMIT 1";
    $result = mysql_query($query);
    if (!$result) {
        toDie(wfMsg('mysqlerror', mysql_error()));
    }
    $row = mysql_fetch_assoc($result);
    $replag = $row['replag'];
    $seconds = floor($replag);
    $text = formatReplag($seconds);
    return array($seconds, $text);
}
Beispiel #2
0
function getReplag()
{
    global $mysql;
    $query = "SELECT UNIX_TIMESTAMP() - UNIX_TIMESTAMP(rc_timestamp) as replag FROM recentchanges ORDER BY rc_timestamp DESC LIMIT 1";
    $result = mysql_query($query);
    if (!$result) {
        toDie("MySQLj ERROR! " . mysql_error($mysql));
    }
    $row = mysql_fetch_assoc($result);
    $replag = $row['replag'];
    $seconds = floor($replag);
    $text = formatReplag($seconds);
    return array($seconds, $text);
}