Jump to content


Multiple set_relation within the same table or different ones

set_relation

  • Please log in to reply
2 replies to this topic

#1 kuduka

kuduka

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 14 January 2018 - 06:38 PM

Hello,

 

 

How can I use multiple set_relation with the same field_name? This is not working:

 

        $crud->set_relation('cityid','pc','postalcode');
        $crud->set_relation('cityid','cities','cityname');
 

Thanks for your help.

 



#2 darkstalker

darkstalker

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationItaly

Posted 14 January 2018 - 07:56 PM

You need to change first field name. Use cityid_pc and cityid_cities for example

#3 kuduka

kuduka

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 15 January 2018 - 03:06 PM

You need to change first field name. Use cityid_pc and cityid_cities for example

I can't use different fields as I only have one FK (cityid) that relates both tables.

Any other ideas?





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users