I have table named timetable which consists Day in it. The data that enter are randomly such as monday friday tuesday and so on. Therefore i want to pull out to php in order starting from monday tuesday and so on.
ORDER BY FIELD(<fieldname>, 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY');
i found out code above is used to solve the problem of mine. But somehow i didn't understand how to use it and what its mean by FIELD and fieldname.
is it suppose to be write like this?
SELECT * FROM timetable WHERE NoStudent = '".$NoStudent."' Order By Day ('Monday', .......);
please help me. Thank you