jaikar Posted December 11, 2007 Share Posted December 11, 2007 hi !.. is it possible in php to find the primary key field name of the table by giving the table name as the input? Thanks ! Quote Link to comment Share on other sites More sharing options...
Crew-Portal Posted December 11, 2007 Share Posted December 11, 2007 Elaborate Plz. PS When you post it will be 100th post so congrats on that! Quote Link to comment Share on other sites More sharing options...
jaikar Posted December 11, 2007 Author Share Posted December 11, 2007 i have a code where i will give the table name as the input, now this table name is already stored from the database, so i dont know which table name will be going as an input to the function. here one more input to the funtion is the primary key of that table. and the primary key of the table is not stored in the database. so if there is any code to get the primary key from the table name, it would be helpfull and easy. any suggestions ? Thanks ! Quote Link to comment Share on other sites More sharing options...
revraz Posted December 11, 2007 Share Posted December 11, 2007 This might help http://dev.mysql.com/doc/refman/5.0/en/table-constraints-table.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.