Home  >  Article  >  Backend Development  >  mysql - [PHP] Can't find a better solution in the process of designing course schedules and querying data?

mysql - [PHP] Can't find a better solution in the process of designing course schedules and querying data?

WBOY
WBOYOriginal
2016-10-17 09:30:02975browse

I have been troubled by this issue of class schedule for a long time. I query based on the academic year and semester on the page. First, I can get the student’s student number--"So I get the class in which he is in--" My data storage field is as shown above. The process-oriented approach is not like Java, which does not have the concept of sets. I need to query based on the school year, semester, week, and class. What I get is a multi-dimensional array. In a fixed table, I cannot traverse the array, except using a large number of Redundant code, I can’t think of a good solution at the moment
mysql - [PHP] Can't find a better solution in the process of designing course schedules and querying data?

mysql - [PHP] Can't find a better solution in the process of designing course schedules and querying data?

Reply content:

I have been troubled by this class schedule issue for a long time. I checked on the page based on the academic year and semester. First, I can get the student’s student number--" Then I get the class he is in--" My data storage fields are as shown above. The process-oriented approach is not like Java, which does not have the concept of sets. I need to query based on the school year, semester, week, and class. What I get is a multi-dimensional array. In a fixed table, I cannot traverse the array, except using a large number of Redundant code, I can’t think of a good solution at the moment
mysql - [PHP] Can't find a better solution in the process of designing course schedules and querying data?

mysql - [PHP] Can't find a better solution in the process of designing course schedules and querying data?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn