Advertisement
Guest User

Untitled

a guest
Jun 18th, 2013
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. <?php
  2. $serverName = "sql";
  3. $conn = sqlsrv_connect($serverName);
  4.  
  5. if($conn === false) {
  6. die(print_r(sqlsrv_errors(), true));
  7. }
  8.  
  9. $params = array(&$_POST['query']);
  10.  
  11. $tsql = "real query hidden";
  12.  
  13. $options = array("Scrollable" => SQLSRV_CURSOR_KEYSET);
  14.  
  15. $getProducts = sqlsrv_query($conn, $tsql, $params, $options);
  16.  
  17. if ($getProducts === false)
  18.  
  19. die( print_r( sqlsrv_errors() ) );
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement