Basically have two tables: Customers and Visits. Wouldso would I query the db to locate something similar to the next:
SELECT * FROM users WHERE (none of: appointments.user = user.id)
I'm presuming I'd need some form of join using the visits table, simply not sure how to start.
SELECT * FROM users LEFT JOIN Appointments ON Users.UserID=Appointments.UserID WHERE Appointments.UserID is null
SELECT * FROM users WHERE users.id NOT IN (SELECT user FROM appointments)