<?php
$conn = new mysqli('localhost', 'root', '', 'granny_restaurant');
if ($conn->connect_error) die('Connection failed: ' . $conn->connect_error);

echo "Menu Items Table Columns:\n";
$result = $conn->query('DESCRIBE menu_items');
while ($row = $result->fetch_assoc()) {
    echo $row['Field'] . ' - ' . $row['Type'] . "\n";
}

echo "\n\nFirst few menu items:\n";
$result = $conn->query('SELECT * FROM menu_items LIMIT 3');
while ($row = $result->fetch_assoc()) {
    echo json_encode($row) . "\n";
}
