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


SELECT DISTINCT col_name, col_name2 FROM tbl_name

Get custom programming done at!

1 comment:

  1. thank you for the help. it was really helpful