From 4292652e9b4c49bd05e4f35ef88d29c3f9a738ec Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Sun, 3 Sep 2023 20:35:19 +0800 Subject: [PATCH] Submissions.php: capitalize SQL commands --- Submissions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Submissions.php b/Submissions.php index ddaa46c..e5932da 100644 --- a/Submissions.php +++ b/Submissions.php @@ -63,23 +63,23 @@ echo "
$header
"; $_SESSION['info_Marking'] = null; } - $resultx1 = mysqli_query($con, "Select Count(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id"); + $resultx1 = mysqli_query($con, "SELECT Count(*) AS cnt FROM lab_report_submissions WHERE lab_report_submissions.Lab_Report_ID=$id"); $row = mysqli_fetch_assoc($resultx1); $count_submissions = $row['cnt']; - $resultx2 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Marked'"); + $resultx2 = mysqli_query($con, "SELECT COUNT(*) AS cnt FROM lab_report_submissions WHERE lab_report_submissions.Lab_Report_ID=$id and Status='Marked'"); $row = mysqli_fetch_assoc($resultx2); $count_marked = $row['cnt']; - $resultx3 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Pending'"); + $resultx3 = mysqli_query($con, "SELECT COUNT(*) AS cnt FROM lab_report_submissions WHERE lab_report_submissions.Lab_Report_ID=$id and Status='Pending'"); $row = mysqli_fetch_assoc($resultx3); $count_unmarked = $row['cnt']; - $resultx4 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Remarking'"); + $resultx4 = mysqli_query($con, "SELECT COUNT(*) AS cnt FROM lab_report_submissions WHERE lab_report_submissions.Lab_Report_ID=$id and Status='Remarking'"); $row = mysqli_fetch_assoc($resultx4); $count_remark = $row['cnt']; - $resultx5 = mysqli_query($con, "SELECT COUNT(*) as cnt FROM course_groups_table WHERE Course_id=$c_id"); + $resultx5 = mysqli_query($con, "SELECT COUNT(*) AS cnt FROM course_groups_table WHERE Course_id=$c_id"); $row = mysqli_fetch_assoc($resultx5); $count_group = $row['cnt'];