Jump to content


Set relation between 3 tables

set_relation set_relation_n_n

  • Please log in to reply
No replies to this topic

#1 hale.adh

hale.adh

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 17 March 2016 - 10:41 PM

I have the following db setup:
Untitled-3.png

 

I have the following code:
 

$crud->set_relation('series_id','series','{series_name} {series_class_id} {series_category_id}');

This gives me a select dropdown with options that look like:
"Series Name - 3 - 2"

 

What I want is options that look like:
"Series Name - Class Name - Category Name"

 

Is there a way to:
- Query the Category table for Category name by ID
- Query the Class table for Class name by ID

- Include that data in the set_relation for series_id?

 

I have a feeling that this will involve writing a custom module.
 







Also tagged with one or more of these keywords: set_relation, set_relation_n_n

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users