Untitled

mail@pastecode.io avatar
unknown
php
10 months ago
1.1 kB
4
Indexable
Never
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>



<?php
  $query="select trim(bacodart) as codart, 
  bacodfam,
  bacatomo,
  trim(bacatomo)+  ' - ' + trim(bcodescr) as catomo,
  bagrumer,
  trim(bagrumer)+  ' - ' + trim(bgmdescr) as grumer
  FROM B2BART 
  left join B2BCATOM on bacatomo=bcocod
  left join B2BGRUME on bagrumer=bgmcod
  order by bacatomo";
  $results2=sqlsrv_query($conn,$query);
        //$row=0;
  while($art=sqlsrv_fetch_array($results2,SQLSRV_FETCH_NUMERIC)){
  $cod=(string)$art[0];
  echo "<tr class= 'table table-sm'>
        
        <td><a href='prodotto.html?testo=".$cod."' style='text-decoration:none;color:black' class='btn btn-outline-primary btn-sm'>".$cod."</a></td>
        <td>".$art[1]."</td>
        <td>".$art[5]."</td>
        <td>".$art[3]."</td>
         </tr>";
       
          
		 
          }                                                                  
  sqlsrv_close( $conn );
?>

        </body>
        </html>