Hello,
I have written a PHP site that is used to schedule courses for CPR.
On the backend i have a table which shows all scheduled courses, however I am having a hard time creating a filter.
Once the admin loads the page I would like the table to display all records. On the top of each column, I have drop downs/text boxes which show disstinct values for each column.
How do I get it to filter if there someone clicks the button. I have tried %like% but then nothing loads unless something is selected.
See image and see mysql code.
SELECT
coursetypes.coursetypename,
scheduledcourses.coursedate,
scheduledcourses.coursetime,
scheduledcourses.courseendtime,
locations.locationname,
instructors.instructorname,
instructors.instructorlastname,
scheduledcourses.coursecost,
scheduledcourses.scheduledcoursesid,
scheduledcourses.coursenumberofseats,
scheduledcourses.notes,
locations.locationcity,
locations.locationstate,
locations.locationzip,
scheduledcourses.privatecourse
FROM
scheduledcourses
INNER JOIN coursetypes ON (scheduledcourses.coursetype=coursetypes.coursetypesid)
INNER JOIN locations ON (scheduledcourses.courselocationid=locations.locationsid)
INNER JOIN instructors ON (scheduledcourses.courseinstructor=instructors.instructorsid)
WHERE
scheduledcourses.coursestatus = 'scheduled'
ORDER BY
scheduledcourses.coursedate