Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && ( $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' )) {
- require 'ssp.class.php';
- // $where = "TypeInventoryID ='FG01'";
- // nama table
- $table = 'ms_part';
- // Table's primary key
- $primaryKey = 'PartID';
- // Array of database columns which should be read and sent back to DataTables.
- // The `db` parameter represents the column name in the database, while the `dt`
- // parameter represents the DataTables column identifier. In this case simple
- // indexes
- $columns = array(
- array('db' => 'PartID', 'dt' => 'PartID'),
- array('db' => 'PartName', 'dt' => 'PartName'),
- array('db' => 'OtherID', 'dt' => 'OtherID'),
- array('db' => 'TypeInventoryID', 'dt' => 'TypeInventoryID')
- );
- // SQL server connection information
- $sql_details = array(
- 'user' => 'root',
- 'pass' => '',
- 'db' => 'mpro',
- 'host' => 'localhost'
- );
- echo json_encode(
- SSP::complex($_GET, $sql_details, $table, $primaryKey, $columns,null, "TypeInventoryID='CM01'")
- );
- } else {
- echo '<script>window.location="404.html"</script>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement