mysql: Get foreign keys

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Giakko

    mysql: Get foreign keys

    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_fiel ds($V['db']['name'],$table) or die
    (mysql_error()) ;
    $columnsCount= mysql_num_field s($fields) or die (mysql_error()) ;
    for ($i = 0; $i < $columnsCount; $i++) {

    $columns[$i]['name']=mysql_field_na me($fields, $i) ;
    $columns[$i]['length']=mysql_field_le n($fields, $i) ;
    $columns[$i]['type']=mysql_field_ty pe($fields, $i) ;
    $columns[$i]['flags']=mysql_field_fl ags($fields, $i);
    }

    but i need alo to know info about foreign keys.


    is it possible?
    thanks,
    simone giacco

  • Richard Levasseur

    #2
    Re: mysql: Get foreign keys

    AFAIK - No, there isn't.

    Comment

    Working...