ESN HR Database Diagnostic

1. Checking config files...
   ✓ config/database.php exists
   ✓ config/auth.php exists
   ✓ config/functions.php exists

2. Testing database connection...
   ✓ Database connected successfully!
   Database: eneryyrc_dev

3. Checking required tables...
   Found 71 tables in database.

   ✓ employees (3 rows)
   ✓ employee_sessions (2 rows)
   ✓ leave_requests (0 rows)
   ✓ leave_balances (2 rows)
   ✓ payslips (0 rows)
   ✓ announcements (2 rows)
   ✓ petty_cash_vouchers (0 rows)
   ✓ petty_cash_items (0 rows)

4. Checking employees table columns...
   ✓ id
   ✓ name
   ✓ email
   ✓ password_hash
   ✓ employee_id
   ✓ department
   ✓ status

5. Checking for test employee...
   ✓ Found employee: Demo Employee (demo@energysmartng.com)

Upload hr_schema.sql to phpMyAdmin to create missing tables.