Current location: Hot Scripts Forums » Programming Languages » PHP » MYSQL innoDB recognizing foreign keys


MYSQL innoDB recognizing foreign keys

Reply
  #1 (permalink)  
Old 03-31-05, 05:10 AM
cmmourik cmmourik is offline
New Member
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
MYSQL innoDB recognizing foreign keys

For my master thesis I am writing a php file that converts a mysql
database to XML. But it is important that I can recognize foreign
keys. I know I can use 'mysql_field_flags' to find primary keys but
don't know if there is a way to recognize foreign keys! Any
suggestions???

Plz help!
Reply With Quote
  #2 (permalink)  
Old 03-31-05, 10:01 AM
moronovich moronovich is offline
Junior Code Guru
 
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
first step for foreign key?
Code:
mysql> show create table table_name;
mysql> show keys from table_name;
after testing in mysql console you can run the mysql_query function and get the appropriate result.
__________________
just an ignorant noob with moronic solution...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
UPDATE: MySQL Auto Backup & Export v1.1 Beyonder General Advertisements 2 03-21-05 02:05 PM
Innodb type Table (Foreign key) zoni PHP 1 05-04-04 03:35 AM
great product for dumping/recovering MySQL databases Dave Brown General Advertisements 1 10-03-03 07:40 AM
Foreign keys in MySQL andreasberglind PHP 1 08-07-03 01:09 PM


All times are GMT -5. The time now is 05:39 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.