Solved

Non-repeating results SQL statement

Posted on 2003-11-05
2
355 Views
Last Modified: 2008-01-16
Hey guys,

I know, busy week for me on these boards right? Hehe...anyways.

SELECT pov
FROM TFCC_files
WHERE pov !='' AND pov!='some' AND pov!='some2' AND pov!='some3'
ORDER  BY pov ASC

And it gives me the results I want...well almost (hence the question).

Let's say that in my data there are multiple entries of the same type, so lets say there are 6 values for 'test'. How do I tell MySQL only to give me the unique ones? So instead of returning 6 results for 'test' it will return 1 unique result for 'test'. I need this because this will become a select box and it will look wierd if 'test' repeats itself 6 times.

Thanks in advance.
0
Comment
Question by:drakkarnoir
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
arjanh earned 500 total points
ID: 9689726
SELECT DISTINCT pov
FROM TFCC_files
WHERE pov !='' AND pov!='some' AND pov!='some2' AND pov!='some3'
ORDER  BY pov ASC
0
 

Author Comment

by:drakkarnoir
ID: 9691053
Thanks much! Was not aware of that SQL statement DISTINCT.

Rock on :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question