Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2366

ssp setting a parameter from a column in array

$
0
0

I need to set a variable based on the the value of column in a ssp script , but for some reason it is not returning the value.


$outOfOffice = ''; $columns[] = array( 'db' => 'OUT_OF_OFFICE', 'dt' => 'out_of_office', 'formatter' => function($d, $row) use ($outOfOffice) { $outOfOffice = trim($row['OUT_OF_OFFICE']); return trim($row['OUT_OF_OFFICE']); } ); if($outOfOffice == 'Vacation Day'){ $columns[] = array( 'db' => 'TOTAL_HOURS_SECONDS', 'dt' => 'total_vacation_hours', 'formatter' => function($d, $row){ $totalVacationhours = floor($row['TOTAL_HOURS_SECONDS'] / 3600); return $totalVacationhours; } ); }else if ($outOfOffice == 'Paid Leave Vacation'){ $columns[] = array( 'db' => 'TOTAL_HOURS_SECONDS', 'dt' => 'total_paid_leave_vacation_hours', 'formatter' => function($d, $row){ $totalPaidLeaveVacationHours = floor($row['TOTAL_HOURS_SECONDS'] / 3600); return $totalPaidLeaveVacationHours; } ); }

Viewing all articles
Browse latest Browse all 2366

Trending Articles