Name: Johnathan Duggan
Handicap: 5.6
Gender: M
EventId: 1
Observaciones: Test observation
Teebox: 56
INSERT INTO Guests (name, handicap, handicapDec, email, federation, createdAt, updatedAt, EventId, Gender) VALUES ('Johnathan Duggan', '5.6', '5.6', '', '0', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '1', 'M')
After running the above SQL, get the inserted ID:
SELECT LAST_INSERT_ID() as guest_id;
Replace 'GUEST_ID_HERE' with the actual guest ID from step 2:
INSERT INTO EventUsers (flight, tee, observations, waitlist, guest, createdAt, updatedAt, UserId, EventId, GuestId, teebox, Seqno, places, starter, main, desert) VALUES ('0', '1', 'Test observation', '0', '1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL, '1', GUEST_ID_HERE, '56', NULL, NULL, 'zzzzz', 'zzzzz', 'zzzzz')
1. Run the guest insert SQL
2. Note the guest ID that was created
3. Run the EventUsers insert SQL with the correct guest ID
4. Check that both records are created correctly