Good morning, I'm here with a pretty big question. I've been in this for a whole day and I still have not been able to resolve the situation. I have a database in sql server and I need to display a buttons with the records of the description of a table, but it turns out that in this table there are records that can be repeated, in this case I have restaurant 4 times because the restaurant has more than one table. I'll show you the printout of the result and leave the code here if you can help me.
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<?php
$sql="SELECT P.id as Id,
P.pointOfSale as [Description],
P.printerExtrat1 as PrinterExtrat1,
P.printerExtrat1FonteTicket as PrinterExtrat1Font,
P.printerExtrat2 as PrinterExtrat2,
P.printerExtrat2FonteTicket as PrinterExtrat2Font,
P.printerExtrat3 as PrinterExtrat3,
P.printerExtrat3FonteTicket as PrinterExtrat3Font,
T.id as IdTable,
T.tableDescription as TableDescription
FROM PointOfSale P LEFT
JOIN PointOfSalesTables T ON P.id=T.idPointOfSale and T.isActive=1
WHERE P.isActive=1
ORDER BY P.pointOfSale";
$result = sqlsrv_query($conn, $sql);
while ($row1 = sqlsrv_fetch_array( $result, SQLSRV_FETCH_NUMERIC)) {
$resultado1 = $row1[1];
?>
<body>
<form method="post">
<a class="banquetes"><?php echo $resultado1; ?></a>
</form>
</body>
<?php
}
?>
I can not show more code because the database links are confidential.