dynamic primary key
i've written a script that is supplied with the info necessary to connect to a table in a database (server, uid/pwd, database, table name, etc.), which then checks to see which fields are in the table, presents the fields in a select box to the user, and lets the user decide which fields he wants to see in the record view.
my goal now is to give users the ability to edit whichever record they decide. but the problem i'm facing here is this: since any database and table name can be supplied to the script, it is somewhat possible that the table will not have any primary key/unique fields. how would i pull up the record that the user clicks on if that's the case?
my goal now is to give users the ability to edit whichever record they decide. but the problem i'm facing here is this: since any database and table name can be supplied to the script, it is somewhat possible that the table will not have any primary key/unique fields. how would i pull up the record that the user clicks on if that's the case?
