'market_cap_rank', 'dt' => 0 ), array( 'db' => 'c_id', 'dt' => 1 , 'formatter' => function( $d, $row ) { $name = $row[20] . "( $d )"; return $name; }, ), array( 'db' => 'price', 'dt' => 2 , 'formatter' => function( $d, $row ) { global $gCrypto; return $gCrypto->formatPrice($d); }, ), array( 'db' => 'market_cap', 'dt' => 3 , 'formatter' => function( $d, $row ) { global $gCrypto; return $gCrypto->formatPrice($d); }, ), array( 'db' => '24hour_volume', 'dt' => 4 , 'formatter' => function( $d, $row ) { global $gCrypto; return $gCrypto->formatPrice($d); }, ), array( 'db' => '5min_pc', 'dt' => 5 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '10min_pc', 'dt' => 6 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '15min_pc', 'dt' => 7 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '30min_pc', 'dt' => 8 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '1hr_pc', 'dt' => 9 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '2hr_pc', 'dt' => 10 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '4hr_pc', 'dt' => 11 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '1d_pc', 'dt' => 12 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '7d_pc', 'dt' => 13 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '14d_pc', 'dt' => 14 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '30d_pc', 'dt' => 15 , 'formatter' => function( $d, $row ) { return $d."%"; }, ), array( 'db' => '90d_pc', 'dt' => 16 , 'formatter' => function( $d, $row ) { global $gCrypto; return $gCrypto->formatPrice($d); }, ), array( 'db' => '180d_pc', 'dt' => 17 , 'formatter' => function( $d, $row ) { global $gCrypto; return $gCrypto->formatPrice($d); }, ), array( 'db' => 'c_name', 'dt' => 18 ), ); $where = " 1=1 "; // SQL server connection information $sql_details = array( 'user' => MYSQL_USER, 'pass' => MYSQL_PASS, 'db' => MYSQL_DBASE, 'host' => MYSQL_HOST ); /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * If you just want to use the basic configuration for DataTables with PHP * server-side, there is no need to edit below this line. */ echo json_encode( SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns,$where ) );