This is my php code (I already have a connection to the db):
$result = mysql_query("SHOW TABLE STATUS FROM mydb LIKE 'mytable';");
while ($array = mysql_fetch_array($result)) {
$updatetime = $array['Update_time'];
}
echo $updatetime;
I get:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource.
I am running MySQL 5.0.89 and PHP5.
I do not want to add a new field to the table… I want to use the table status…
Any help?
Thanks!
Figured it out. Not sure if this is the perfect way, but it works…
You can then parse the raw timestamp with substr.
P.S. As I was doing this for WordPress, I am including the code specifically for working in the WordPress DB…