jgillmanjr Posted December 31, 2008 Share Posted December 31, 2008 I was just curious if anyone had any pre-written code to check for FK constraints in MySQL (I'm using 5.1) before I started going through information_schema and hashing out my own stuff. Quote Link to comment https://forums.phpfreaks.com/topic/139001-any-one-have-predone-code-to-check-for-foreign-key-constraints/ Share on other sites More sharing options...
fenway Posted January 2, 2009 Share Posted January 2, 2009 Not sure how you mean... you mean dump a list? Quote Link to comment https://forums.phpfreaks.com/topic/139001-any-one-have-predone-code-to-check-for-foreign-key-constraints/#findComment-727868 Share on other sites More sharing options...
jgillmanjr Posted January 2, 2009 Author Share Posted January 2, 2009 Yeah, kinda. Something like an array (although it would most likely end up multidimensional) that contains FK references for each of the columns that has them. Quote Link to comment https://forums.phpfreaks.com/topic/139001-any-one-have-predone-code-to-check-for-foreign-key-constraints/#findComment-728081 Share on other sites More sharing options...
Mchl Posted January 2, 2009 Share Posted January 2, 2009 SELECT * FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` Quote Link to comment https://forums.phpfreaks.com/topic/139001-any-one-have-predone-code-to-check-for-foreign-key-constraints/#findComment-728082 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.