<?php 
include 'aksi/koneksi.php';
$cabang = $_GET['cabang'];

// Database connection info 
$dbDetails = array( 
    'host' => $servername, 
    'user' => $username, 
    'pass' => $password, 
    'db'   => $db
); 
 
// DB table to use 
// $table = 'members'; 
$table = <<<EOT
 (
    SELECT 
      a.barang_id, 
      a.barang_kode, 
      a.barang_nama, 
      a.kategori_id, 
      a.barang_tanggal,
      a.barang_harga, 
      a.barang_harga_beli,
      a.barang_stock,
      a.barang_terjual,
      a.barang_satuan_id,
    
 ) temp
EOT;
 
// Table's primary key 
$primaryKey = 'barang_id'; 
 
// Array of database columns which should be read and sent back to DataTables. 
// The `db` parameter represents the column name in the database.  
// The `dt` parameter represents the DataTables column identifier. 
$columns = array( 
    array( 'db' => 'barang_id', 'dt' => 0 ),
    array( 'db' => 'barang_kode', 'dt' => 1 ), 
    array( 'db' => 'barang_nama',  'dt' => 2 ), 
    array( 'db' => 'kategori_id',      'dt' => 3 ), 
    array( 'db' => 'barang_tanggal',     'dt' => 4 ), 
    array( 'db' => 'barang_harga',    'dt' => 5 ),
    array( 'db' => 'barang_harga_beli',    'dt' => 6 ),
    array( 'db' => 'barang_stock',    'dt' => 7 ),
     array( 'db' => 'barang_terjual',    'dt' => 8 ),
      array( 'db' => 'barang_satuan_id',    'dt' => 9 ),

    
    
    
    
); 

// Include SQL query processing class 
require 'aksi/ssp.php'; 

