validation for uniqueness of record
Posted: Tue Mar 11, 2008 11:18 pm
I am trying to put in some method, so that record inserted must be unique. For example in inventory table, the itemname should be unique i.e. there should not be two entries for Ford_IKON.
This calls for validation by reading values from database table. Validation will not work directly, and only way is to have trigger in delegate class:
What should this *CODE* include is my question[/code]
This calls for validation by reading values from database table. Validation will not work directly, and only way is to have trigger in delegate class:
- Code: Select all
function beforeInsert(&$record){
*CODE*
}
What should this *CODE* include is my question[/code]