Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <?php
  2.  
  3. // DB table to use
  4. $table = 'distributor';
  5.  
  6. // Table's primary key
  7. $primaryKey = 'id';
  8.  
  9. $columns = array(
  10.     array( 'db' => 'name', 'dt' => 0 ),
  11. );
  12.  
  13. // SQL server connection information
  14. $sql_details = array(
  15.     'user' => 'root',
  16.     'pass' => 'stackoverflow',
  17.     'db'   => 'stackoverflow',
  18.     'host' => 'localhost'
  19. );
  20.  
  21. require( 'ssp.class.php' );
  22.  
  23. echo json_encode(
  24.     SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
  25. );
  26.  
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement