Advertisement
pushtook

Untitled

Dec 11th, 2016
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. /* ///sql server connection */
  2.  
  3.  $user="itgasite"; #a valid username
  4. $password="itga1111!"; #a password for the username
  5.  
  6. $connection = odbc_connect("MSSQLServer", $user, $password);
  7.  
  8. if ($connection) {
  9.     echo "Connection established.";
  10. } else{
  11.     echo odbc_errormsg();
  12. }
  13.  
  14.  
  15. $query = "SELECT CUSTOMER_NAME, TELEPHONE_1, TELEPHONE_3, EMAIL, DATE4, HNUM FROM CUSTOMERS WHERE (CODE_SUG = 2) AND (HNUM = N'10924') AND (COMPANYNUMBER = N'057431397')";
  16. $result = odbc_exec($connection, $query);
  17.  
  18. debug($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement