Jump to content


setRelation for 2 tables


  • Please log in to reply
No replies to this topic

#1 harshalone

harshalone

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 13 July 2019 - 09: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.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users