I have a table (employees) like this
ID Name Group Email
1 Bob Buckland Marketing email@example.com 2 George Alaz Engineering firstname.lastname@example.org 3 Tom Grady Marketing email@example.com 4 Mary Jane Engineering firstname.lastname@example.org
Im going to use this in a email form. First a combobox should load all the groups possible. This means it should load 2 groups, Marketing and Engineering
Groups is easy I believe:
select distinct Group from employees;
After selecting that, I should load all the names that are in that group.
Im not sure how to do names:
select Name from employees where=?
The "where" condition is what Im not sure about.
And after, how do I get the email I selected?