<?php
$db = new PDO('mysql:host=localhost;dbname=bismitri_admin_panel;charset=utf8mb4', 'root', '', [
    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
]);
echo 'COUNT=' . $db->query('SELECT COUNT(*) FROM invoices')->fetchColumn() . "\n";
$ids = $db->query('SELECT id FROM invoices LIMIT 5')->fetchAll(PDO::FETCH_COLUMN);
foreach ($ids as $id) {
    echo 'ID=' . $id . "\n";
}
