Hi there,
I am selecting some info from a database table that looks something like this:
id name
-- ----
1 smith
2 jones
3 peters
4 johnson
5 smith
6 smith
I would like to select all unique names from this table. If I select * from the table I get everything, including 3 occurrances of smith... however I'd like just the 4 unique names.
How can I accomplish with with MySQL or with PHP?
Thanks,
-dr
I am selecting some info from a database table that looks something like this:
id name
-- ----
1 smith
2 jones
3 peters
4 johnson
5 smith
6 smith
I would like to select all unique names from this table. If I select * from the table I get everything, including 3 occurrances of smith... however I'd like just the 4 unique names.
How can I accomplish with with MySQL or with PHP?
Thanks,
-dr