Quantcast
Viewing all articles
Browse latest Browse all 82036

Compare with if between two columns

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


Viewing all articles
Browse latest Browse all 82036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>