I can get table columns with information about columns types by writting:
$table = new Zend_Db_Table('schema.table_name');
$info = $table->info();
There is information about Primary key, but nothing about Foreign keys.
Please help!
I can get table columns with information about columns types by writting:
$table = new Zend_Db_Table('schema.table_name');
$info = $table->info();
There is information about Primary key, but nothing about Foreign keys.
Please help!
What your commentor is saying, is that Zend Framework 1x does not have the information about foreign keys or indexes available to the Zend_Db_Table_Abstract
class.
You need to define a reference map so that information will become available. It would be nice if this information where available to the database adapter however I'm fairly sure that the availability of this information is uneven across the different databases and different database engines.
for table you can try using simple query like
use INFORMATION_SCHEMA;
select TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME,
REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME from KEY_COLUMN_USAGE where
REFERENCED_TABLE_NAME = '<table>';
for a table column, the same but add an and for the REFERENCED_COLUMN_NAME.