Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/conference/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/conference/fix_events.sql

-- Direct SQL to fix events status and dates
USE copmadinaconf;

-- Show current events status
SELECT 'BEFORE UPDATE:' as status;
SELECT id, title, status, start_date FROM events;

-- Update events from 'published' to 'active'
UPDATE events SET status = 'active' WHERE status = 'published';

-- Update past dates to future dates (30 days from today)
UPDATE events SET 
    start_date = DATE_ADD(CURDATE(), INTERVAL 30 DAY),
    end_date = DATE_ADD(CURDATE(), INTERVAL 32 DAY)
WHERE start_date < CURDATE();

-- Show results after update
SELECT 'AFTER UPDATE:' as status;
SELECT id, title, status, start_date FROM events;

-- Count active upcoming events
SELECT COUNT(*) as active_upcoming_events 
FROM events 
WHERE status = 'active' AND start_date >= CURDATE();

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists