SubmitLab.php: make SQL statement look cleaner

Bug430-Eden2
Lan Hui 2023-09-01 18:50:26 +08:00
parent faef5670db
commit 5ff32fae1a
1 changed files with 3 additions and 1 deletions

View File

@ -27,7 +27,9 @@ include 'Header.php';
$row = mysqli_fetch_assoc($result0);
$course_name = $row['Course_Name'];
$result1 = mysqli_query($con," SELECT `Type`, `Lab_Report_ID`, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4` FROM `lab_reports_table` WHERE Lab_Report_ID=$id and Deadline > '$c_date' ORDER by Lab_Report_ID DESC");
$result1 = mysqli_query($con, "SELECT Type, Lab_Report_ID, Course_ID, Posted_Date, Deadline, Instructions, Title, Attachment_link_1, Attachment_link_2, Attachment_link_3, Attachment_link_4
FROM lab_reports_table
WHERE Lab_Report_ID=$id AND Deadline>'$c_date' ORDER BY Lab_Report_ID DESC");
if(mysqli_num_rows($result1) == 0)
{
echo "No active assignments for this course so far.";