Thanks Euromark,

I actually don't think that PHP code is the correct solution to this
check :) I think that the correct solution is to let the database
handle the unique check. The model will then be passed back the error
and will take action on it (by the code we write). Probably there
should be a translation of the error codes in between the database and
the model (datasource?).

The code that Andy D. (sample) and you posted will, as far as I
understand, only handle the case of ensuring uniqueness in the
submitted data, not in both the submitted data and the existing data
in the table. Correct me if I am wrong :)

Enjoy,
   John

On Apr 22, 6:08 pm, euromark <[email protected]> wrote:
[snipped code from euromark]

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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

Reply via email to