Showing posts with label distinct mysql. Show all posts
Showing posts with label distinct mysql. Show all posts

Friday, July 18, 2008

How to get distinct(unique) rows from mysql table using php

The simple way to get the unique values from a mysql table is to use DISTINCT keyword in your mysql query.


SELECT DISTINCT col_name FROM tbl_name

OR

SELECT DISTINCT col_name, col_name2 FROM tbl_name




Get custom programming done at GetAFreelancer.com!