Posted By

daisuke103 on 02/17/08


Tagged

php textmate to symfony many propel


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

rccc


PHP Symfony sfManyToMany 多対多


 / Published in: Other
 

  1. <?php
  2. // sfPropelManyToMany
  3. /**
  4. *
  5. */
  6. class ClassName extends AnotherClass
  7. {
  8.  
  9. public function getHogehoge($name)
  10. {
  11. $c = new Criteria();
  12. $c->add(HogehogePeer::ID, $id);
  13. $hogehoge = HogehogePeer::doSelectOne($c);
  14. if($hogehoge){
  15. return sfPropelManyToMany::getRelatedObjects($hogehoge,'中間テーブル名');
  16. }
  17. }
  18. }

Report this snippet  

You need to login to post a comment.