query('SELECT COUNT(*) FROM acc_accounts')->fetchColumn(); } catch (Throwable $e) { error_log('Chart of accounts count failed: ' . $e->getMessage()); } echo $added > 0 ? sprintf('Chart of accounts seeded successfully. Added %d account(s); total is now %d.', $added, $total) : sprintf('Chart of accounts already up to date. Total accounts: %d.', $total);