I’m trying to determine a way to query data from a MySQL database and, if there is already a duplicate of that data, to skip it and move to the next one.
What I’m trying to accomplish is to pull a list of department’s from a database and list them once for ex:
MySQL table
1 Accounting
2 Manufacturing
3 Manufacturing
4 HR
I want it to print:
Accounting, Manufacturing, HR
You can use
GROUP BY:Or
DISTINCT: