payee and payer are in the same column. What can I do to search within both.
$g->select_command = "SELECT id,code,date,payer,payee,amount_dvz,status,amount,kurkodu,accdes,type,accname from sys_transactions WHERE firmaid=$firmaid AND category='Havale'";
$col = array(); $col["title"] = "Hesap Kartı"; $col["name"] = "payee"; $col["width"] = '100'; $col["search"] = true; $col["on_data_display"] = array("display_stage_banka", ""); function display_stage_banka($data) { $op = $data["payer"]; $op2 = $data["payee"]; if ($op!=''){ return $op; }else{ return $op2; } } $cols[] = $col;
1 Answers
You need to set it on
$col[“dbname”] = “if(payer!=”,payer,payee)”;
After that it will use above in WHERE clause when this field is filtered.
Your Answer