This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 5th, 2014  |  syntax: None  |  size: 7.16 KB  |  views: 54  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. SELECT 'Regular' "sales_type", sum(sales_type1) "sales" FROM salesTable
  2.        
  3. string(7) "م�����"
  4.        
  5. db2_connect ( '*LOCAL', 'user', 'pass' );
  6. if (! $connection) {[error code]}
  7. $stmt = db2_prepare ( $connection, $strSql );
  8. if (! db2_execute ( $stmt ) ) { [error code ]
  9. while ( $row = db2_fetch_array ( $stmt ) ) {
  10.    var_dump($row[1]);
  11. }
  12.        
  13. string(7) "Ù…‡¤“™"
  14.        
  15. _COOKIE["ZDEDebuggerPresent"]   php,phtml,php3
  16. _SERVER["ZendEnablerConfig"]    /www/zendserver/conf/fastcgi.conf
  17. _SERVER["PHPRC"]    /usr/local/ZendSvr/etc/
  18. _SERVER["PHP_FCGI_CHILDREN"]    40
  19. _SERVER["PHP_FCGI_MAX_REQUESTS"]    0
  20. _SERVER["CCSID"]    819
  21. _SERVER["LANG"] C
  22. _SERVER["INSTALLATION_UID"] 20101203131436121338
  23. _SERVER["LDR_CNTRL"]    MAXDATA=0x40000000
  24. _SERVER["LIBPATH"]  /usr/local/ZendSvr/lib
  25. _SERVER["DB2NOEXITLIST"]    TRUE
  26. _SERVER["ORACLE_HOME"]  .
  27. _SERVER["ORA_NLS10"]    no value
  28. _SERVER["ORA_NLS_PROFILE33"]    no value
  29. _SERVER["FCGI_ROLE"]    RESPONDER
  30. _SERVER["REDIRECT_UNIQUE_ID"]   UYKvWcCoAQIAAnZHWG8AABS@
  31. _SERVER["REDIRECT_STATUS"]  200
  32. _SERVER["UNIQUE_ID"]    UYKvWcCoAQIAAnZHWG8AABS@
  33. _SERVER["QIBM_USE_DESCRIPTOR_STDIO"]    Y
  34. _SERVER["HTTP_HOST"]    vmas400.vm.com:10090
  35. _SERVER["HTTP_CONNECTION"]  keep-alive
  36. _SERVER["HTTP_X_REQUESTED_WITH"]    XMLHttpRequest
  37. _SERVER["HTTP_USER_AGENT"]  Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
  38. _SERVER["CONTENT_TYPE"] application/x-www-form-urlencoded
  39. _SERVER["HTTP_ACCEPT"]  */*
  40. _SERVER["REFERER"]  http://vmas400.vm.com:10090ZendServer/Index/Index
  41. _SERVER["HTTP_REFERER"] http://vmas400.vm.com:10090/ZendServer/Index/Index
  42. _SERVER["REFERER_URL"]  http://vmas400.vm.com:10090/ZendServer/Index/Index
  43. _SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate,sdch
  44. _SERVER["HTTP_ACCEPT_LANGUAGE"] en-US,en;q=0.8
  45. _SERVER["HTTP_ACCEPT_CHARSET"]  ISO-8859-1,utf-8;q=0.7,*;q=0.3
  46. _SERVER["HTTP_COOKIE"]  ZENDSERVERSESSID=7asfv608qffhv556msem6evi66; CosmeticContest=16062; CompanyWithStoreDetail=16061; TYLYClassAnalysis=16068; OrderDetail=17220; RmsOrders=17221; DailyReceipts=16063; DailySales=17562; OnOrder=16064; OpenPurchaseOrders=17566; RegularPriceRankings=17568; ReviewStatistics=17570; SalesAndStock=17573; StocksByPeriod=17575; Top10BestSellers=17577; ReplenishmentAssortment=17269; RABS=17616; FreeFormatSku=16473; TYLYSalesAndOH=21294; SalesRecapByDate=16312; VendorAgendaSummary=23219; BasicStock=23474; InStock=16067; RegSalesAvgStockSummary=21270; TYLYSalesMDGMByStore=23822; VendorAgenda=23826; Header=16066; usc=adam; hudi[u]=d106b7a04c0d94b8a0e7624a017ead98324b57e8; hudi[i]=fec51923e58c84db4647d2b3e11fe03ec3f0c202; FreeFormat=16506; __utma=118969486.352613215.1355776933.1365626094.1367348033.12; __utmz=118969486.1355776933.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); ZDEDebuggerPresent=php,phtml,php3
  47. _SERVER["PATH"] /bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin
  48. _SERVER["SERVER_SIGNATURE"] no value
  49. _SERVER["SERVER_SOFTWARE"]  Apache
  50. _SERVER["SERVER_NAME"]  vmas400.vm.com
  51. _SERVER["SERVER_ADDR"]  192.168.1.2
  52. _SERVER["SERVER_PORT"]  80
  53. _SERVER["REMOTE_ADDR"]  172.16.129.193
  54. _SERVER["DOCUMENT_ROOT"]    /www/zendserver/htdocs/prod
  55. _SERVER["SERVER_ADMIN"] [no address given]
  56. _SERVER["SCRIPT_FILENAME"]  /usr/local/zendsvr/gui/html/index.php
  57. _SERVER["DOCUMENT_NAME"]    /usr/local/zendsvr/gui/html/index.php
  58. _SERVER["REMOTE_PORT"]  14259
  59. _SERVER["REDIRECT_QUERY_STRING"]    dojo.preventCache=1367519066445
  60. _SERVER["REDIRECT_URL"] /ZendServer/Information/Phpinfo
  61. _SERVER["GATEWAY_INTERFACE"]    CGI/1.1
  62. _SERVER["SERVER_PROTOCOL"]  HTTP/1.1
  63. _SERVER["REQUEST_METHOD"]   GET
  64. _SERVER["QUERY_STRING"] dojo.preventCache=1367519066445
  65. _SERVER["REQUEST_URI"]  /ZendServer/Information/Phpinfo?dojo.preventCache=1367519066445
  66. _SERVER["SCRIPT_NAME"]  /ZendServer/index.php
  67. _SERVER["DOCUMENT_URI"] /ZendServer/index.php
  68. _SERVER["RULE_FILE"]    conf/httpd.conf
  69. _SERVER["PHP_SELF"] /ZendServer/index.php
  70. _SERVER["REQUEST_TIME"] 1367519066
  71.        
  72. <?php
  73.   //Establish connection to database
  74.   $host = "midrange";
  75.   $conn = db2_connect ($host, user, pass);
  76. ?>
  77.  
  78. <table width="75%" border="1" cellspacing="1" cellpadding="1" bgcolor="#eeeeee">
  79. <tr>
  80.   <td><b>Name</b></td>
  81.   <td><b>Email</b></td>
  82.   <td><b>3rd column</b></td>
  83. </tr>
  84.  
  85. <?php
  86. $query = 'Select name, email, 'Markdown' "THIRD" from table';
  87.  
  88. //Execute query
  89. $queryexe = db2_exec($conn, $query) ;
  90.  
  91. //Fetch results
  92. while(db2_fetch_row($queryexe)) {
  93.  $name  = db2_result($queryexe, 'NAME');
  94.  $email = db2_result($queryexe, 'EMAIL');
  95.  $const = db2_result($queryexe, 'THIRD');
  96.  
  97. //Put the results in an HTML table.
  98. print("<tr bgcolor=#ffffff>n");
  99. print("<td>$name</td>n");
  100. print("<td>$email</td>n");
  101. print("<td>$const</td>n");
  102. print("</tr>n");
  103. }
  104. ?>
  105. </table>
  106.        
  107. ibm_db2
  108. IBM DB2, Cloudscape and Apache Derby support    enabled
  109. Module release  1.9.0
  110. Module revision     $Revision: 297218 $
  111. Binary data mode (ibm_db2.binmode)  DB2_BINARY
  112. DB2 instance name (ibm_db2.instance_name)   no value
  113.  
  114. iconv
  115. iconv support   enabled
  116. iconv implementation    IBM iconv
  117. iconv library version   unknown
  118.  
  119. Directive   Local Value Master Value
  120. iconv.input_encoding    ISO8859-1   ISO8859-1
  121. iconv.internal_encoding ISO8859-1   ISO8859-1
  122. iconv.output_encoding   ISO8859-1   ISO8859-1
  123. Environment
  124. Variable    Value
  125. ZendEnablerConfig   /www/zendsvr/conf/fastcgi.conf
  126. PHPRC   /usr/local/ZendSvr/etc/
  127. PHP_FCGI_CHILDREN   5
  128. PHP_FCGI_MAX_REQUESTS   0
  129. CCSID   819
  130. LANG    en_US
  131. INSTALLATION_UID    20101215125734236656
  132. LIBPATH     /usr/local/ZendSvr/lib
  133. DB2NOEXITLIST   TRUE
  134.  
  135. PHP Variables
  136. Variable    Value
  137. _REQUEST["TJE"] no value
  138. _REQUEST["TE3"] no value
  139. _REQUEST["ZDEDebuggerPresent"]  php,phtml,php3
  140. _COOKIE["TJE"]  no value
  141. _COOKIE["TE3"]  no value
  142. _COOKIE["ZDEDebuggerPresent"]   php,phtml,php3
  143. _SERVER["ZendEnablerConfig"]    /www/zendsvr/conf/fastcgi.conf
  144. _SERVER["PHPRC"]    /usr/local/ZendSvr/etc/
  145. _SERVER["PHP_FCGI_CHILDREN"]    5
  146. _SERVER["PHP_FCGI_MAX_REQUESTS"]    0
  147. _SERVER["CCSID"]    819
  148. _SERVER["LANG"] en_US
  149. _SERVER["INSTALLATION_UID"] 20101215125734236656
  150. _SERVER["LIBPATH"]  /usr/local/ZendSvr/lib
  151. _SERVER["DB2NOEXITLIST"]    TRUE
  152. _SERVER["FCGI_ROLE"]    RESPONDER
  153. _SERVER["SCRIPT_URL"]   /hello.php
  154. _SERVER["QIBM_USE_DESCRIPTOR_STDIO"]    Y
  155. _SERVER["HTTP_USER_AGENT"]  Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101 Firefox/20.0
  156. _SERVER["HTTP_ACCEPT"]  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  157. _SERVER["HTTP_ACCEPT_LANGUAGE"] en-US,en;q=0.5
  158. _SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
  159. _SERVER["HTTP_DNT"] 1
  160. _SERVER["HTTP_CONNECTION"]  keep-alive
  161. _SERVER["HTTP_PRAGMA"]  no-cache
  162. _SERVER["HTTP_CACHE_CONTROL"]   no-cache
  163. _SERVER["PATH"] /bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin
  164. _SERVER["SERVER_SIGNATURE"] no value
  165. _SERVER["SERVER_SOFTWARE"]  Apache
  166. _SERVER["DOCUMENT_ROOT"]    /www/zendsvr/htdocs
  167. _SERVER["SERVER_ADMIN"] [no address given]
  168. _SERVER["SCRIPT_FILENAME"]  /www/zendsvr/htdocs/hello.php
  169. _SERVER["DOCUMENT_NAME"]    /www/zendsvr/htdocs/hello.php
  170. _SERVER["REMOTE_PORT"]  54747
  171. _SERVER["GATEWAY_INTERFACE"]    CGI/1.1
  172. _SERVER["SERVER_PROTOCOL"]  HTTP/1.1
  173. _SERVER["REQUEST_METHOD"]   GET
  174. _SERVER["QUERY_STRING"] no value
  175. _SERVER["REQUEST_URI"]  /hello.php
  176. _SERVER["SCRIPT_NAME"]  /hello.php
  177. _SERVER["DOCUMENT_URI"] /hello.php
  178. _SERVER["RULE_FILE"]    conf/httpd.conf
  179. _SERVER["PHP_SELF"] /hello.php
  180. _SERVER["REQUEST_TIME"] 1367514482
clone this paste RAW Paste Data