[PHP-DB] Displaying the time of the Latest Update to an ISAM table

2005-02-20 Thread boclair
PHP 4.3.10
MySql 4.0.20
How do I find and then display on a web page the time that additional 
data added to, or,  existing data amended in an ISAM table?

My latest futile attempt , with connection made and the database already 
selected,

?PHP
$logged = mysql_query(SHOW TABLE TABLE UPDATE_TIME from  members);
if (!$logged) {$logged=not found;}
else {$logged=$logged;}
?
pLast logged: ?PHP =$logged;?/p
With no errors reported, the display is not found.
Louise



Re: [PHP-DB] Displaying the time of the Latest Update to an ISAM table

2005-02-20 Thread boclair
Typo. Sorry.  Should read of course
SHOW TABLE STATUS UPDATE_TIME
Louise
boclair wrote:
PHP 4.3.10
MySql 4.0.20
How do I find and then display on a web page the time that additional 
data added to, or,  existing data amended in an ISAM table?

My latest futile attempt , with connection made and the database 
already selected,

?PHP
$logged = mysql_query(SHOW TABLE TABLE UPDATE_TIME from  members);
if (!$logged) {$logged=not found;}
else {$logged=$logged;}
?
pLast logged: ?PHP =$logged;?/p
With no errors reported, the display is not found.
Louise



RE: [PHP-DB] Displaying the time of the Latest Update to an ISAM table

2005-02-20 Thread Bastien Koert
if you date stamp the data input, query that field
bastien
From: boclair [EMAIL PROTECTED]
To: php-db@lists.php.net php-db@lists.php.net
Subject: [PHP-DB] Displaying the time of the Latest Update to an ISAM table
Date: Mon, 21 Feb 2005 10:38:12 +1000
PHP 4.3.10
MySql 4.0.20
How do I find and then display on a web page the time that additional data 
added to, or,  existing data amended in an ISAM table?

My latest futile attempt , with connection made and the database already 
selected,

?PHP
$logged = mysql_query(SHOW TABLE TABLE UPDATE_TIME from  members);
if (!$logged) {$logged=not found;}
else {$logged=$logged;}
?
pLast logged: ?PHP =$logged;?/p
With no errors reported, the display is not found.
Louise

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Displaying the time of the Latest Update to an ISAM table

2005-02-20 Thread [EMAIL PROTECTED]

boclair wrote:
PHP 4.3.10
MySql 4.0.20
How do I find and then display on a web page the time that additional 
data added to, or,  existing data amended in an ISAM table?

My latest futile attempt , with connection made and the database 
already selected,

?PHP
$logged = mysql_query(SHOW TABLE STATUS UPDATE_TIME FROM  members);
if (!$logged) {$logged=not found;}
else {$logged=$logged;}
?
pLast logged: ?PHP =$logged;?/p
With no errors reported, the display is not found. 

I believe this syntax is wrong. 

With a database, workshop3,  and datatable,  jobs, should it have read
?PHP
$logged = mysql_query(SHOW TABLE STATUS UPDATE_TIME FROM  workshop3 
LIKE 'jobs');
if (!$logged) {$logged=not found;}
else {$logged=$logged;}
?
pLast logged: ?PHP =$logged;?/p

but $logged is false.  Is my syntax still wrong or cannot the last date 
modified not be got this way

But using the SHOW TABLE STATUS array was successful.
?PHP
$query = mysql_fetch_array(mysql_query(SHOW TABLE STATUS FROM workshop3 
LIKE 'jobs'));
$lastmod = $query['Update_time'];
?
pLast updated ?PHP = $lastmod; ?/p

Am I correct in assuming that working with the SHOW TABLE STATUS array 
is more efficient than finding the MAX timestamp inserted/replaced for 
the purpose into each ROW?

Louise
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php