<?php
/*
* dbupdate.php
* http://tasuke.dna.affrc.go.jp/
*
* Author: Ryutaro Itoh
*
* Copyright (c) 2013 National Institute of Agrobiological Sciences   
*
*/

require '../conf/config.php';

//////////////////////////////////  Connecting with DB
if( !$conn = new mysqli($host, $user, $pswd, $db)) {
    error_log("Connection failed.\n");
    exit;
}

//DB
$update_time="0000-00-00 00:00:00";
if($result = $conn->query("SELECT UPDATE_TIME FROM information_schema.tables WHERE table_schema='".$db."' ORDER BY UPDATE_TIME desc limit 1")) {
    while ($row = $result->fetch_row()) {
        $update_time=$row[0];
    }
    $result->close();
}

//DB config
$update_time .= ":".date('Y-m-d H:i:s', filemtime('../conf/config.php'));
echo $update_time;
?>

