Unique Column in A Row

Unique Column in A Row

mankramomankramo Posts: 24Questions: 5Answers: 0

Hi all, I have a table called team. Now this team table has 12 columns and the first is the table id column (primary key). The other 11 columns are populated through a select input type whose option comes from another table (players). Now since a single player can not appear in the same team twice. I want to ensure that every column in the team table is unique. I know something like

->validator( 'Validate::unique', array(
"required" => true,
"notEmpty" => true,
"message" => "Item Exists"
) )

is used to ensure that all the values in a particlar column are unique., but what i want is for every value in a row to be unique. Please how can i achieve this ?

Answers

This discussion has been closed.