'John Doe', 'email' => 'john.doe@example.com', 'plan' => 'Premium HD', 'status' => 'Active'], ['name' => 'Jane Smith', 'email' => 'jane.smith@example.com', 'plan' => 'Basic', 'status' => 'Active'], ['name' => 'Mike Johnson', 'email' => 'mike.j@example.com', 'plan' => 'Premium HD', 'status' => 'Suspended'], ['name' => 'Sarah Williams', 'email' => 'sarah.w@example.com', 'plan' => 'Family Pack', 'status' => 'Deactivated'], ]; $stmt = $pdo->prepare("INSERT INTO customers (name, email, plan, status) VALUES (:name, :email, :plan, :status) ON DUPLICATE KEY UPDATE name=VALUES(name), plan=VALUES(plan), status=VALUES(status)"); foreach ($customers as $customer) { echo "Seeding customer: " . $customer['name'] . "...\n"; try { $stmt->execute($customer); echo "Success.\n"; } catch (PDOException $e) { echo "Error seeding customer " . $customer['name'] . ": " . $e->getMessage() . "\n"; } } } seed_customers();