I have a MySQL db, table with data that loads from a source every 2 - 4 hours, I am currently typing when the table was last updated. Currently it is updated with load data local infile replace into mytable
so the data loads automatically with cron, I just want to display below the html table when the data was last updated.
I have tried update_time and information.schema, but doesn't display anything it just displays blank in the area I would like it to appear.
Here is a query I have tried which seems simplest, and preferable, but only displays BLANK white page.
<?php
$connection = mysql_connect('host', 'user', 'password');
mysql_select_db('db');
$query= "SHOW TABLE STATUS LIKE 'count_page'"; $result=mysql_query($query);
if (mysql_num_rows($results)> 0) {
$rst=mysql_fetch_arry($result); print $rst['Update_time'];
} else {
print 'These arent the droids youre looking for';
}
mysql_close();
?>