So I'm still very new to databases. I have a table called patappts, where the name of the hygienist that will be serving the patient for each appointment is stored, among other things. When a user clicks on a date to sign up for an appointment it sends the start time of the appointment that was clicked through to my php file. What I'm trying to do is get the names of all my hygienists in my hygienists table that are not already in my patappts table with the same start time as the one that the user clicked. Therefore only showing the names of the hygienist's that don't already have an appointment at that time.
Not quite sure what to use in my query to achieve this.
$sql = "SELECT hyg FROM patappts WHERE start != '$start' UNION SELECT name FROM hygienists";