<?php
require_once 'config.php';
$sql = file_get_contents('sql/employee_master.sql');
$queries = explode(';', $sql);
$db = getDB();
foreach ($queries as $q) {
    $q = trim($q);
    if (!empty($q)) {
        try {
            $db->exec($q);
            echo "Success: " . substr($q, 0, 50) . "...\n";
        } catch (Exception $e) {
            echo "Error: " . $e->getMessage() . " on query: " . substr($q, 0, 50) . "...\n";
        }
    }
}
echo "Done.";
?>
