I am using codeigniter. Below is the form validation set rule
unique[bf_product.product_order,bf_product.id]
bf_product = table name
product_order = column name
I want to add another column i.e:
product_category
names tounique
rule inform validation
.
So that the product can be fetch on the basis of product_order
and product_category
, and the user can't input same order no. for a particular category.
Example:
- Product category 1 - product - sort order = 1
- Product category 1 - product - sort order = 1
(Not possible,already exist)
- Product category 2 - product - sort order = 1
(Possible)