I was rummaging around the DB just looking it over as I'd had some trouble with searches when I found that oc_product_description had two primary keys!
These are found in product_id and language_id when one looks at the structure under phpMyAdmin. Note I am running php 7.3.x, and my collation is utf8mb4_unicode_ci.
I understood that two primary keys was not supposed to exist in a DB so I tried a totally fresh locahost install and yup, there it is again in oc_product_description.
I haven't turned up any reference to this in a few searches so I figured I'd post it here. Everythign I see says you can't have two primary keys in one table so either phpMyAdmin is reporting some other key for language_id as a second primary key or OC has a slight issue here...
I now see there are many tables with two or more primary keys. I thought using more than one primary key in a table was a bad idea but perhaps I am reading the wrong information. Can someone enlighten me please?
Thanks!
You can have multiple primary keys. They will enforce unique values, and will speed up querying of those values. https://stackoverflow.com/questions/217 ... ate%20keys.
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
It's correct. Its primary key consists of 2 indexes to make it unique: product_id and language_id
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Who is online
Users browsing this forum: No registered users and 79 guests