mysql: Get foreign keys

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Dear reader,
there is a function to get the foreign keys of a table??

i have this function to get all table infos:
$fields = mysql_list_fields($V['db']['name'],$table) or die
$columnsCount= mysql_num_fields($fields) or die (mysql_error());
for ($i = 0; $i < $columnsCount; $i++) {

        $columns[$i]['name']=mysql_field_name($fields, $i) ;
        $columns[$i]['length']=mysql_field_len($fields, $i) ;
        $columns[$i]['type']=mysql_field_type($fields, $i) ;
        $columns[$i]['flags']=mysql_field_flags($fields, $i);

but i need alo to know info about foreign keys.

is it possible?
simone giacco

Re: mysql: Get foreign keys

AFAIK - No, there isn't.

Site Timeline