0
有什麼建議嗎?任何人都解決過這個問題?如何將使用多個連接和子查詢的SQL查詢轉換爲Perl DBIx :: Class?
select c.parent_id, c.category_id, c.name, count(*) from categories c join product_categories pc on c.category_id = pc.category_id join authorizations a on pc.product_id = a.product_id join set_authorizations sa on a.authorization_id = sa.authorization_id where a.active = 1 and sa.set_id = 2 and c.parent_id in ( select category_id from categories where parent_id is null ) group by c.parent_id, c.category_id, c.name;
在此先感謝...
您是否已經爲表和外鍵創建了DBIx :: Class定義? – dgw 2012-02-23 18:44:33