This is a discussion on mysql: Get foreign keys within the PHP Language forums, part of the PHP Programming Forums category; Dear reader, there is a function to get the foreign keys of a table?? i have this function to get ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 (mysql_error()); $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? thanks, simone giacco |