Modifica query SQL homepage

This commit is contained in:
2026-03-20 11:59:06 +01:00
parent 7e80c743e5
commit f357d509a8

View File

@@ -2,7 +2,7 @@
include 'db_conf.php'; include 'db_conf.php';
// Query per ottenere tutti i prodotti // Query per ottenere tutti i prodotti
$sql = "SELECT * FROM Products"; $sql = "SELECT p.ProductID, p.ProductName, c.Name AS 'CategoryName', p.Description, p.Price, p.StockQuantity FROM Products p JOIN Categories c ON p.CategoryID=c.CategoryID";
$result = $conn->query($sql); $result = $conn->query($sql);
if ($result === false) { if ($result === false) {