Untitled

mail@pastecode.io avatarunknown
php
15 days ago
854 B
2
Indexable
Never
<?php
  $serverName = "SRV-AHR\SQLEXPRESS"; //serverName\instanceName
  $connectionInfo = array( "Database"=>"B2B_SYNC", "UID"=>"ahr", "PWD"=>"atk","TrustServerCertificate"=>1);
  $conn = sqlsrv_connect( $serverName, $connectionInfo);
  $query="select bacodart,badescr,bacatomo FROM B2BART order by bacatomo";
  $results2=sqlsrv_query($conn,$query);
        //$row=0;
  while($art=sqlsrv_fetch_array($results2,SQLSRV_FETCH_NUMERIC)){
  echo "<tr class= 'table table-light table-striped'>
        <td>".$art[0]."</td>
        <td>".$art[1]."</td>
        <td>".$art[2]."</td>
       
       
          
		  <td><input type = 'button' id='".$art[0]."' value= '🔎' class='ricerca'  onclick = 'funz(".$art[0].")'></td>	
		  </tr>";
          }                                                                  
  sqlsrv_close( $conn );
?>