prevent duplicate for Composite key columns |
at last, i added a column brandcategories, in form i hide it (display:none) and assign value using javascript code as
brand_id + category_id in Model added a validation "is_unique" for this new column. its working fine. its a way around when i can't have a solution without adding this extra column in table. regards. Newbie here in CodeIgniter World !! Please appologize if any nonsense from me.
environment: Windows 10, XAMPP 3.3.0, VS Code, SQLyog Community Ed.
|
Messages In This Thread |
prevent duplicate for Composite key columns - by Ahmed Haroon - 05-20-2022, 03:15 AM
RE: prevent duplicate for Composite key columns - by kenjis - 05-21-2022, 05:24 PM
RE: prevent duplicate for Composite key columns - by Ahmed Haroon - 05-22-2022, 09:49 PM
RE: prevent duplicate for Composite key columns - by Ahmed Haroon - 05-23-2022, 11:31 PM
RE: prevent duplicate for Composite key columns - by kenjis - 05-24-2022, 12:16 AM
RE: prevent duplicate for Composite key columns - by Ahmed Haroon - 05-24-2022, 10:19 PM
|