Hello, I am having trouble joining two tables. Seems like the join works just fine but at the results table the content is always empty:
A look from the Edit:
Even if i select manually and save still nothing changes on the table.
This is my code:
public function reservations() { $crud = new grocery_CRUD(); $crud->set_theme('bootstrap'); $crud->set_table('reservations'); $crud->set_subject('Reservation'); $crud->columns('RES_ID', 'PROP_NAME', 'RES_CHECK_IN', 'RES_CHECK_OUT', 'RES_N_ADULTS', 'RES_GUEST_FIRSTNAME', 'RES_GUEST_LASTNAME', 'BOOKING_SOURCE_ID', 'DATE_ADDED', 'IS_TRANSFER', 'IS_ARRIVED'); $crud->display_as('RES_ID','RES ID'); $crud->display_as('PROP_ID','PROP NAME'); $crud->display_as('RES_CHECK_IN','CHECKIN'); $crud->display_as('RES_CHECK_OUT','CHECKOUT'); $crud->display_as('RES_N_ADULTS','GUESTS'); $crud->display_as('RES_GUEST_FIRSTNAME','FIRST NAME'); $crud->display_as('RES_GUEST_LASTNAME','LAST NAME'); $crud->display_as('BOOKING_SOURCE_ID','SOURCE'); $crud->display_as('IS_TRANSFER','TRANSFER?'); $crud->display_as('IS_ARRIVED','ARRIVED?'); $crud->set_relation('PROP_ID', 'properties', 'PROP_NAME'); $crud->set_relation('BOOKING_SOURCE_ID', 'listBookingSources', 'BOOKING_SOURCE_LABEL'); $output = $crud->render(); $this->_example_output($output); return $output; }
A look from the tables:
Thanks!