<?php
include 'includes/db.php';

function checkColumnType($table, $column) {
    global $conn;
    $sql = "SHOW COLUMNS FROM $table LIKE '$column'";
    $result = $conn->query($sql);
    if ($result->num_rows > 0) {
        $row = $result->fetch_assoc();
        echo "$table.$column type is: " . $row['Type'] . "\n";
    } else {
        echo "$table.$column does not exist.\n";
    }
}

checkColumnType('users', 'academic_year');
checkColumnType('applications', 'academic_year');
?>
