Jump to content


set relation with two tables

set_relation

  • Please log in to reply
No replies to this topic

#1 yoandry

yoandry

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 11 January 2016 - 10: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

 

 

 

Attached Thumbnails

  • bd.jpg






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users