Files
2026-09-16 23:20:08 +07:00

11 lines
395 B
PHP

<?php
try {
$db = new PDO("mysql:host=127.0.0.1;port=3306;dbname=ksh_payroll;charset=utf8mb4", "root", "@Samui@10742");
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = file_get_contents(__DIR__ . '/add_officer_types.sql');
$db->exec($sql);
echo "SQL executed successfully.\n";
} catch (\PDOException $e) {
echo "Error: " . $e->getMessage() . "\n";
}