I'm  begginer in Symfony 2. I want update my database's row. I have
the following query:

        public function getDataUpdate($code, $code2, $shortname, $name)
                {

                        $query = $this->getEntityManager()->createQuery('UPDATE
A10\CrmBundle\Entity\Crm c SET c.code2= ?1, c.shortname=           ?2,
c.name = ?3 WHERE c.code = ?1');
                        $query->setParameter(1, $code2);
                        $query->setParameter(2, $shortname);
                        $query->setParameter(3, $name);

                        return $query->getResult();
                }

And I have got this route:

data_update:
    pattern:  /data-edit/update/{code}/{code2}/{shortname}/{name}
    defaults: { _controller: A10CrmBundle:Update:update, code:97,
code2:97, shortname:97, name:Harmónia Food Kft.}
    requirements:
        _method:  POST
        code: \d+
        code2: \d+


If I want update the 97., it's work. If other, it doesn't work. I get
the following message: No route found for "POST /data-edit/data-edit/
update"

Could anyone help me? Or could I Update Entity with other method?
I hope, it is understandable. Sorry my english.

Thanks

Misel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to