⚠ 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

Callback column, left outer join



Alfandi Nurulmukhlis
  • profile picture
  • Member

Posted 12 November 2013 - 02:29 AM

Hello..

can i use callback column function  for left outer join ?

how can i use this?

can anyone give example code for this?

for example,

i have 2 tables, table X and Y

X have field A,B,C
Y have field E,B,F

Controller :

...
$crud->set_table('X');
...
$crud->columns('A','B','C','N');
...
$crud->callback_column('N',array(this,'_cb_N'));
...
$output = $crud->render();

function _cb_N($value, $row);
{
...
}


i want to this in callback column:
SELECT *
FROM X LEFT OUTER JOIN Y
  ON X.B = Y.B;

i want to column N display field B from table Y

pleaseeee help me..