I\'ve been using PostgreSQL and now migrating to MySQL.
In my queries, I\'m using PostgreSQL\'s SELECT DIST
SELECT DIST
you should migrate to PDO or MSYQLI instead of MYSQL as its already deprecated.
about your question you can do
SELECT DISTINCT col1, col2, col3
or
SELECT col1, col2, col3 ........ GROUP BY col1 --//--- or whatever column you want to be distinct