⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

setRelation for 2 tables



harshalone
  • profile picture
  • Member

Posted 13 July 2019 - 21:24 PM

Hi I have two tables

 

Table 1===================

#Events

 

eventid

eventname

category_id

 

 

#Event_categories

ecatid

cat_name

 

 

When I render Events table I want to see category name I know I can use setrelation but my category field has 2 different name in two different tables

 

and its not possible at the moment in current format

 

$crud->setRelation('officeCode', 'offices', 'city');

 

I want to connect Events->category_id = Event_category->ecatid

 

Can you please tell me how can I connect them so that I can see category name when I edite events.


ajuser
  • profile picture
  • Member

Posted 12 February 2020 - 12:03 PM

Did you get a solution? I have a similar problem