⚠ 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

set relation with two tables



yoandry
  • profile picture
  • Member

Posted 11 January 2016 - 22:58 PM

Sorry I not speak English that is google traslator ;) I hope you can understand me

 

i have that

 

public function orders() {
        try {
            /* This is only for the autocompletion */
            $crud = new grocery_CRUD();
            $crud->set_table('orders');
           
            $crud->set_relation('customer_id', 'customer', 'name');

            $output = $crud->render();
            $this->_main_output($output);
        } catch (Exception $e) {
            show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
        }
    }

 

 

I need to create the orders but only to customers who have a contract and that the date not expired

 

Thanks