Hello friends,
In a query I want to make, there are 10 lines connected with AND in the WHERE section and there is no issue in 9 of them. However, I am creating a range by getting a date from the user in one line. The problem starts here, the user should be able to query without entering a date range. However, my written SQL query does not run unless the AND operator after BETWEEN is filled. The PROBLEMATIC PART OF THE QUERY is AND AlumniAcademicInfo.grad_date BETWEEN '$start_date%' AND '$end_date%' If you could correct this part, it would be greatly appreciated. Thank you in advance.
In a query I want to make, there are 10 lines connected with AND in the WHERE section and there is no issue in 9 of them. However, I am creating a range by getting a date from the user in one line. The problem starts here, the user should be able to query without entering a date range. However, my written SQL query does not run unless the AND operator after BETWEEN is filled. The PROBLEMATIC PART OF THE QUERY is AND AlumniAcademicInfo.grad_date BETWEEN '$start_date%' AND '$end_date%' If you could correct this part, it would be greatly appreciated. Thank you in advance.