[symfony-users] Re: How to customize the save process of many-to-many relation in symfony form framework?

2010-03-05 Thread SymfonyNewbie
Symfony binds with doctrine, so I wander if there is a ORM based solution so that I don't have to write queries explicitly? On 3月6日, 上午6时41分, Alex wrote: > may be like this > >  $db = Doctrine_Manager::connection(); >  $sql = "insert into tags(name) value('$name') on duplicate key upadte > count

[symfony-users] Re: How to customize the save process of many-to-many relation in symfony form framework?

2010-03-05 Thread Alex
may be like this $db = Doctrine_Manager::connection(); $sql = "insert into tags(name) value('$name') on duplicate key upadte count=count+1"; $db->exec($sql); or with prepare statement (NO sql-inject) $db = Doctrine_Manager::connection(); $sql = "insert into tags(name) value(?) on duplicate

[symfony-users] Re: How to customize the save process of many-to-many relation in symfony form framework?

2010-03-04 Thread Tom Ptacnik
I'm not good at doctrine at all, but I think that i you don't know how to write this in DQL (Doctrine Query Language) there is a way how to write pure SQL and execute it On 4 bře, 08:58, SymfonyNewbie wrote: > You are right,I'm using doctrine. > > Looking for information how it deals with dml li

[symfony-users] Re: How to customize the save process of many-to-many relation in symfony form framework?

2010-03-03 Thread SymfonyNewbie
You are right,I'm using doctrine. Looking for information how it deals with dml like "insert .. on duplicate key update".. On 3月4日, 下午2时38分, Tom Ptacnik wrote: > It depends on which ORM do you use.. Propel or Doctrine? > > I think this is more about ORM than symfony... > > On 3 bře, 13:07, Symfo

[symfony-users] Re: How to customize the save process of many-to-many relation in symfony form framework?

2010-03-03 Thread Tom Ptacnik
It depends on which ORM do you use.. Propel or Doctrine? I think this is more about ORM than symfony... On 3 bře, 13:07, SymfonyNewbie wrote: > The relation between posts and tags is n2m, > > the pure mysql solution is like this: > >     $dml = "insert into tags(name) value('$name') on duplicat