Wouldn't be better to validate the uniqueness before saving the data? On Fri, Mar 28, 2008 at 12:58 PM, Greg Baker <[EMAIL PROTECTED]> wrote: > > How can I capture a MySQL error like the following: > > Warning (512): SQL Error: 1062: Duplicate entry > 'TestSlot-47e9547d-6570-4e3e-9834-16b88699522c' for key 2 [CORE/cake/ > libs/model/datasources/dbo_source.php, line 459] > > Basically I have a unique key set across two fields in a table so that > if I add a 'Slot' which belongsTo a 'Conference' the slot name must be > unique within that conference. > > >
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---