Why do you not  add an unique constraint to the name field?

Look at the sfPropelUniqueValidator, if you want to validate this  
constraint on php side.

- Frank


Am 18.09.2007 um 19:34 schrieb jhon cañas:

>
> hi..
> I need validate if a record exist in a table before insert. example:
>
> id | name |
> ---------------
> 1  | Jhon  |
> 2  | Jhon  |  <---- this does not have to be repeated...
> 3  | Jean  |
> .
> .
> .
> if found, go to the next
> I have the folowing code
>
>
> $c = new Name;
> $c->setNameEnt($vall->getEnteCarga());
> $c=Save();
>
> The anterior code save all without validate if exist.
>
>
> >
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to