Compare with if between two columns
Compare with if between two columns
alansilva
Posts: 1Questions: 1Answers: 0
Hello, how could I compare between two columns?
$columns = array(
array( 'db' => 'id', 'dt' => 0 ),
array( 'db' => 'price', 'dt' => 1 ),
array( 'db' => 'qtd_min', 'dt' => 2 ),
array(
'db' => 'qtd',
'dt' => 3,
'formatter' => function( $d, $row ) {
if($d < 'qtd_min') { // I don't know how to do it
return ' - '.$d;
}
}
)
);
Thanks in advance
This discussion has been closed.
Answers
I have absolutely no idea what you are donig there @alansilva but this code echos my two silly messages
The
$row
parameter has the rest of the row in it, so you would use:Allan