Solved

mysql display unique using php

Posted on 2014-03-12
6
445 Views
Last Modified: 2014-03-12
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?
0
Comment
Question by:XK8ER
  • 3
  • 3
6 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39923821
SELECT UNIQUE namecolumn,othercolumns FROM table WHERE namecolumn='name'

Open in new window

0
 
LVL 1

Author Comment

by:XK8ER
ID: 39923872
i dont know the names so how do I do that?
0
 
LVL 58

Expert Comment

by:Gary
ID: 39923875
Then remove that part

SELECT UNIQUE column_name,other_columns FROM table

Open in new window

0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 1

Author Comment

by:XK8ER
ID: 39923881
your code did not work.. but this works


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

Open in new window

0
 
LVL 58

Expert Comment

by:Gary
ID: 39923903
Oops wrong database type.
0
 
LVL 1

Author Comment

by:XK8ER
ID: 39924565
I've requested that this question be deleted for the following reason:

found the answer myself
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with PHP 13 27
ability to create nested list on the UI using PHP, HTML, Javascript 7 42
Combining Queries 7 27
How do I show metrics with PHP or Javascript 6 31
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

792 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