PHP - SQL query to get update time from table status

Posted by Tribalcomm on Stack Overflow See other posts from Stack Overflow or by Tribalcomm
Published on 2010-03-28T05:05:33Z Indexed on 2010/03/28 5:13 UTC
Read the original article Hit count: 199

Filed under:
|
|

This is my php code (I already have a connection to the db):

$array = mysql_query("SHOW TABLE STATUS FROM 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!

© Stack Overflow or respective owner

Related posts about mysql

Related posts about php