Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $table = 'guru';
- // Table's primary key
- $primaryKey = 'idguru';
- // 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' => 'idguru', 'dt' => 0 ),
- array( 'db' => 'nama', 'dt' => 1 ),
- array( 'db' => 'jeniskelamin', 'dt' => 2 ),
- array( 'db' => 'tanggal', 'dt' => 3 ),
- array( 'db' => 'alamat', 'dt' => 4 ),
- array( 'db' => 'telp', 'dt' => 5 ),
- array( 'db' => 'pekerjaan', 'dt' => 6 ),
- array( 'db' => 'golongan', 'dt' => 7 ),
- array( 'db' => 'jabatan', 'dt' => 8 ),
- );
- // SQL server connection information
- $sql_details = array(
- 'user' => 'root',
- 'pass' => '',
- 'db' => 'gaji',
- 'host' => 'localhost'
- );
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * If you just want to use the basic configuration for DataTables with PHP
- * server-side, there is no need to edit below this line.
- */
- require( 'js\DataTables-1.10.2\examples\server_side\scripts\ssp.class.php' );
- echo json_encode(
- SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement