⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

how to make unique the combination of two fields



jloliva1984

jloliva1984
  • profile picture
  • Member

Posted 09 July 2018 - 13:01 PM

how to make unique the combination of two fields, example in a table with fields month, establishment, location, there can only be one record per establishment per month, something like $ crud-> unique_fields (array ('month', 'establishment')) ; but I think that in this way it verifies the fields separately, I need them to be unique the combination of both, thanks in advance