RE: [PHP] Distinguishing foreign keys in a table?
| From: | Mark Charette | Date: | Mon, 21 Apr 2003 01:16:40 +0000 |
| Subject: | RE: [PHP] Distinguishing foreign keys in a table? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144583@lists.php.net to get a copy of this message | ||
> From: Ken Tozier [mailto:kentozier@attbi.com]
>
> Is it possible to determine if a field in a table is a foreign key? I
> looked at all the mysql_xxx functions but didn't see anything that
> looked like it would return this type of info. Once a foreign key is
> established, I would also need to get the table name associate with
> that key so I could navigate the link. Is that possible?
See http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html
and
http://www.mysql.com/doc/en/example-Foreign_keys.html
to learn how MySQL current handles (and doesn't handle) foreign key
constraints.