Advertisement
pushtook

itga/renew

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