-- Sample UPDATE statement for EventScores table
-- Test this in phpMyAdmin to verify the UPDATE functionality

-- First, let's see what's currently in the table for your event
SELECT * FROM EventScores WHERE eventId = 2639 AND flight = '1';

-- Sample UPDATE statement (update the existing record)
UPDATE EventScores SET 
    player1_name = 'John Smith Updated',
    player1_hcp = 13.0,
    player1_slope = 127,
    player2_name = 'Jane Doe Updated', 
    player2_hcp = 16.5,
    player2_slope = 120,
    front9_stableford = 22,
    back9_stableford = 18,
    total_stableford = 40,
    club = 'La Hacienda Updated',
    marked = 'YES',
    updated_at = CURRENT_TIMESTAMP
WHERE eventId = 2639 AND flight = '1';

-- Alternative UPDATE with different test data:
/*
UPDATE EventScores SET 
    player1_name = 'Updated Player 1',
    player1_hcp = 11.5,
    player1_slope = 125,
    player2_name = 'Updated Player 2',
    player2_hcp = 14.0,
    player2_slope = 118,
    front9_stableford = 19,
    back9_stableford = 21,
    total_stableford = 40,
    club = 'Updated Club Name',
    marked = 'YES',
    updated_at = CURRENT_TIMESTAMP
WHERE eventId = 2639 AND flight = '1';
*/

-- Check the result after update
SELECT * FROM EventScores WHERE eventId = 2639 AND flight = '1';
