mysql display unique using php

hello,
I have about 12,000 records inside mysql table and I would select everything and just display the "names" from a Column without duplicates.. how can I do this using php?
LVL 1
XK8ERAsked:
Who is Participating?
 
GaryCommented:
SELECT UNIQUE namecolumn,othercolumns FROM table WHERE namecolumn='name'

Open in new window

0
 
XK8ERAuthor Commented:
i dont know the names so how do I do that?
0
 
GaryCommented:
Then remove that part

SELECT UNIQUE column_name,other_columns FROM table

Open in new window

0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
XK8ERAuthor Commented:
your code did not work.. but this works


SELECT DISTINCT (stockSymbol ) AS daStock FROM US500 ORDER BY daStock DESC  

Open in new window

0
 
GaryCommented:
Oops wrong database type.
0
 
XK8ERAuthor Commented:
I've requested that this question be deleted for the following reason:

found the answer myself
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.