daily pastebin goal
56%
SHARE
TWEET

Untitled

a guest Nov 15th, 2018 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && ( $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' )) {
  4.    
  5.     require 'ssp.class.php';
  6.    // $where = "TypeInventoryID ='FG01'";
  7.     // nama table
  8.     $table = 'ms_part';
  9.  
  10.     // Table's primary key
  11.     $primaryKey = 'PartID';
  12.  
  13.     // Array of database columns which should be read and sent back to DataTables.
  14.     // The `db` parameter represents the column name in the database, while the `dt`
  15.     // parameter represents the DataTables column identifier. In this case simple
  16.     // indexes
  17.  
  18.     $columns = array(
  19.         array('db' => 'PartID', 'dt' => 'PartID'),
  20.         array('db' => 'PartName', 'dt' => 'PartName'),
  21.         array('db' => 'OtherID', 'dt' => 'OtherID'),
  22.         array('db' => 'TypeInventoryID', 'dt' => 'TypeInventoryID')
  23.     );
  24.  
  25.     // SQL server connection information
  26.     $sql_details = array(
  27.         'user' => 'root',
  28.         'pass' => '',
  29.         'db' => 'mpro',
  30.         'host' => 'localhost'
  31.     );
  32.  
  33.  
  34.     echo json_encode(
  35.             SSP::complex($_GET, $sql_details, $table, $primaryKey, $columns,null, "TypeInventoryID='CM01'")
  36.     );
  37. } else {
  38.     echo '<script>window.location="404.html"</script>';
  39. }
  40. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top