Hey,
According to the manual
http://framework.zend.com/manual/en/zend.db.html#zend.db.adapter.list-describe
That info is not listed among the rest. I did some checking and in order to do that the method "describeTable" under Zend\Db\Adapter\<database_driver>.php you will see something like this:
$desc[$this->foldCase($row['Field'])] = array(
'SCHEMA_NAME' => null, // @todo
'TABLE_NAME' => $this->foldCase($tableName),
'COLUMN_NAME' => $this->foldCase($row['Field']),
'COLUMN_POSITION' => $i,
'DATA_TYPE' => $row['Type'],
'DEFAULT' => $row['Default'],
'NULLABLE' => (bool) ($row['Null'] == 'YES'),
'LENGTH' => $row['Length'],
'SCALE' => $row['Scale'],
'PRECISION' => $row['Precision'],
'UNSIGNED' => $row['Unsigned'],
'PRIMARY' => $row['Primary'],
'PRIMARY_POSITION' => $row['PrimaryPosition'],
'IDENTITY' => $row['Identity']
);
You will have to add it there to be able to use it with the describeTable method by default. I would add a suggestions for this. or an issue.
Vince.
--
Vincent Gabriel.
Lead Developer, Senior Support.
Zend Certified Engineer.
Zend Framework Certified Engineer.
According to the manual
http://framework.zend.com/manual/en/zend.db.html#zend.db.adapter.list-describe
That info is not listed among the rest. I did some checking and in order to do that the method "describeTable" under Zend\Db\Adapter\<database_driver>.php you will see something like this:
$desc[$this->foldCase($row['Field'])] = array(
'SCHEMA_NAME' => null, // @todo
'TABLE_NAME' => $this->foldCase($tableName),
'COLUMN_NAME' => $this->foldCase($row['Field']),
'COLUMN_POSITION' => $i,
'DATA_TYPE' => $row['Type'],
'DEFAULT' => $row['Default'],
'NULLABLE' => (bool) ($row['Null'] == 'YES'),
'LENGTH' => $row['Length'],
'SCALE' => $row['Scale'],
'PRECISION' => $row['Precision'],
'UNSIGNED' => $row['Unsigned'],
'PRIMARY' => $row['Primary'],
'PRIMARY_POSITION' => $row['PrimaryPosition'],
'IDENTITY' => $row['Identity']
);
You will have to add it there to be able to use it with the describeTable method by default. I would add a suggestions for this. or an issue.
Vince.
On Tue, Apr 14, 2009 at 10:05 PM, Nikolaos Dimopoulos <nikos@niden.net> wrote:
Hello list,Is there a way to retrieve the Update_time of a table using Zend_Db? I looked at the metadata array that the info() returns but didn't see anything there. At the moment I am using the following code:$q = "SHOW TABLE STATUS WHERE Name = '$table'";$data = $db->fetchRow($query);$updated = strtotime($data['Update_time']);Any pointers would be more than appreciated.ThanksNikolaos Dimopoulos
--
The contents of this message may contain confidential or privileged information and is intended solely for the recipient(s). Use or distribution to and by any other party is not authorized. If you are not the intended recipient, copying, distribution or use of the contents of this information is prohibited.
--
Vincent Gabriel.
Lead Developer, Senior Support.
Zend Certified Engineer.
Zend Framework Certified Engineer.
没有评论:
发表评论