<?php
$db = new mysqli('localhost', 'root', '', 'shopnest');
if($db->connect_error) die('Connect Error');

echo "Table: orders\n";
$res = $db->query("DESCRIBE orders");
while($row = $res->fetch_assoc()) {
    echo $row['Field'] . " (" . $row['Type'] . ") - Null: " . $row['Null'] . "\n";
}

echo "\nTable: order_items\n";
$res = $db->query("DESCRIBE order_items");
while($row = $res->fetch_assoc()) {
    echo $row['Field'] . " (" . $row['Type'] . ") - Null: " . $row['Null'] . "\n";
}
?>
