Sindbad~EG File Manager
<?php
// Apply organizational fields to nonmember_registrations table
require_once 'config/database.php';
try {
$conn = getConnection();
// Read and execute the SQL file
$sql = file_get_contents(__DIR__ . '/database/add_nonmember_org_fields.sql');
// Split by semicolon and execute each statement
$statements = array_filter(array_map('trim', explode(';', $sql)));
foreach ($statements as $statement) {
if (!empty($statement) && !str_starts_with($statement, '--')) {
$conn->exec($statement);
echo "Executed: " . substr($statement, 0, 50) . "...\n";
}
}
echo "Successfully added organizational fields to nonmember_registrations table!\n";
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}
?>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists