Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は mysql クエリを持っていますが、symfony2.0 でクエリを作成する方法がわかりません。
クエリ:
SELECT a.id, a.name, FROM `ms_musiccategory` a LEFT OUTER JOIN `ms_musiccategory` b ON a.parent_Id = b.id ORDER BY coalesce( b.name, a.name ) , a.name
$con = $this -> getEntityManager() -> getConnection(); $st = $con -> prepare(' SELECT a.* FROM `tablename` a LEFT OUTER JOIN `tablename` b ON a.parent_Id = b.id ORDER BY coalesce( b.name, a.name ) , a.name'); $st -> execute(); $list = $st -> fetchAll();