Thanks Alexander, but looks like that one is out of date...anyone else with an idea? Correct me if I am wrong, because I tried what Alexander had to say but that did not work at all.
On Fri, Dec 11, 2009 at 2:30 PM, Alexandre Salomé < [email protected]> wrote: > Have a look at that : http://snippets.symfony-project.org/snippet/50 > > Looks like you have two criterias : 1 to specify how to find records to > update, and 2 to define what you change. > > Alexandre > > 2009/12/11 Parijat Kalia <[email protected]> > >> Guys, I have an update query in criteria, which is not working, I am not >> sure why, all the data that is being fed has been cross checked and is >> present, the fields are correct as well, so here is the query: >> $d = new Criteria(); >> $d->add(QuestionsPeer::ID,$questionId); >> $d->add(QuestionsPeer::QUESTION,$updatedQuestion); >> $d->add(QuestionsPeer::OPTION1,$updatedOption1); >> $d->add(QuestionsPeer::OPTION2,$updatedOption2); >> $d->add(QuestionsPeer::OPTION3,$updatedOption3); >> $d->add(QuestionsPeer::OPTION4,$updatedOption4); >> QuestionsPeer::doUpdate($d); >> >> >> The above is in a loop (if method is post then) and it does get inside the >> loop, so not sure why the above query is not being updated. >> the first statement is to basically retrieve the object by the primary >> key! >> Thanks >> >> -- >> You received this message because you are subscribed to the Google Groups >> "symfony users" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<symfony-users%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en. >> > > > > -- > Alexandre Salomé > http://alexandre-salome.fr > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<symfony-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "symfony users" 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/symfony-users?hl=en.
