Multiple primary key
Multiple primary key
culcul89
Posts: 4Questions: 1Answers: 0
Hi guys, i'm working with DataTable and i find it very usefull, now i have to show and update a table which have 3 primary key and i don't know how to code it.
I'm using Editor::inst( $db, 'table', 'pKey' ) but when i do an update, there's an error because i have more than one of those pkey.
Anyone had this problem before?
Thak you!
This discussion has been closed.
Replies
What database allows a table to have multiple primary keys?
Most databases allow multiple columns to be used as a primary key (known as a compound key), which is what I presume @culcul89 is referring to.
@culcul89 - At this time the prebuilt Editor PHP libraries do not support compound keys. It is a feature that I plan to add in future, but at the moment you would need to create your own server-side scripts to have it work with Editor.
Regards,
Allan
@allan yeah that is what i mean...well i'm not that expert in PHP so i don't know how to do it..any idea when this update can come?
Thanks
Likely not until the second half of this year to be honest as I've got a number of other features I want to deploy first.
Allan
uhm, i would like to buy it but i can't without this feature..any suggestion for helping me to do it?
Sorry - it sounds like Editor isn't suitable for your use case at the moment :-(
Allan
It didn't occur to me that you meant a compound key. I used compound keys for a short time but they became so awkward to work with that I scrapped them.