ここで私が間違っていることを誰かが見ることができますか? データベースのフィールドの値に応じて特定のページを含めようとしています。
確認するテーブルが 2 つあります。
ユーザー名が table.1 に表示され、field.units = days inlcude days.php の場合
ユーザー名が table.1 に表示され、field.units = Hours inlcude Hours.php の場合
ユーザー名が table.2 に表示され、field.units = days inlcude days.php の場合
ユーザー名が table.2 に表示され、field.units = Hours inlcude Hours.php の場合
   $username = $USER->firstname.' '.$USER->lastname;
    echo $username;
    $is_academic_result = mysql_query('SELECT * from holiday_entitlement_academic where employee = '.$username.'');
    $is_business_result = mysql_query('SELECT * from holiday_entitlement_business_manual where employee = '.$username.'');
    if(mysql_num_rows($is_academic_result) > 0){
    while($is_academic = mysql_fetch_array($is_academic_result)) {
    if ($is_academic['units'] == 'days'){include('days.php');}
    else if ($is_academic['units'] == 'hours'){include('hours.php');}
    }
    }
    else if(mysql_num_rows($is_business_result) > 0){
    while($is_business = mysql_fetch_array($is_business_result)) {
    if ($is_business['units'] == 'days'){include('days.php');}
    else if ($is_business['units'] == 'hours'){include('hours.php');}
    }
    }