Hi,
Can any one help me fetch foreign keys (fields) information from a table?
I mean any query that may be helpful or any structure in MYSQL that can work. I have already tried "SHOW TABLE STATUS WHERE NAME= 'abc' " query , and a lot of other things but none of them was helpful.
If anyone knows, kindly reply me ASAP:)
Best Regards, Zahra
Hi
Dne Wed, 15 Jul 2009 16:43:14 +0500 Zahra Naeem xara.fast@gmail.com napsal(a):
Can any one help me fetch foreign keys (fields) information from a table?
For export we do it using SHOW CREATE TABLE and parsing result. Maybe INFORMATION_SCHEMA can provide better way, but I'm not sure.
Zahra Naeem a écrit :
Hi,
Can any one help me fetch foreign keys (fields) information from a table?
I mean any query that may be helpful or any structure in MYSQL that can work. I have already tried "SHOW TABLE STATUS WHERE NAME= 'abc' " query , and a lot of other things but none of them was helpful.
If anyone knows, kindly reply me ASAP:)
Best Regards, Zahra
Have a look at libraries/relation.lib.php, we have a PMA_getForeigners() function, you can pass it the $source parameter containing 'foreign'.