Introspecting foreign keys in MySQL

0 views
Skip to first unread message

krillzip

unread,
Sep 6, 2008, 11:39:40 AM9/6/08
to Professional PHP Developers, kril...@gmail.com
Hi!

For the moment I'm working on a php script that is introspecting MySQL
databases. The purpose is to document the scheme of a database and
tables automatically. My problem for the moment is to query MySQL for
the foreign keys (InnoDB) in a practical way.

I know I could use : SHOW CREATE TABLE test_db.field_2
but for this I have to parse the outputed SQL.

I want to know if there is a better way to get the foreign key
information

thnx at advance
//krillzip
Reply all
Reply to author
Forward
0 new messages