how to select unique rows from mysql distinct keyword query

Mobile
feeds
Welcome Login | Register

how to select unique rows from mysql distinct keyword query
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » MYSQL Forums
        » » how to select unique rows from mysql distinct keyword query
how to select unique rows from mysql distinct keyword query
Post Description: how to select unique rows from mysql distinct keyword query MYSQL
Post Tags:
This Post Has Been Viewed 233 Times Since Mon Dec 08, 2008 1:49 pm Author Wallpaperama with 0 replies
how to select unique rows from mysql distinct keyword query
Advertise On This Page




distinct()


ok, lets say you want to do a mysql query but you dont want the quieries to repeat. right.

well, you can do a distinc query in mysql. Getting a list of unique values from a MySQL column is easy if you know how. so how do you select unique rows? there are many ways to select a mysql unique key or mysql unique constraint, but the best and easiest way to get mysql unique index is by mysql unique column which i use for an online mysql guide mysql distinct keyword by selecting unique identifier.

for example, lets say i have these rows:

1. wallpaperama free wallpapers
2. wallpaperama wallpapers
3. wallpaperama free wallpapers
4. free wallpapers
5. free wallpaperama
6. free wallpapers
7. wallpaperama wallpapers
8. free wallpaper
9. wallpaperama free

ok if you look at the 9 rows above, you will see that there are some rows that are identical. so i dont want to select the ones that repeat, i only want the ones that dont repeat which are unique or one of a kind. so this is how my list should come out

1. wallpaperama free wallpapers
2. wallpaperama wallpapers
3. free wallpapers
4. free wallpaperama
5. wallpaperama free

so by doing this, i can gnore duplicate entries in MySQL selecting and using DISTINCT keyword

and this is how my sql querie would look like:

$sql = "SELECT DISTINCT(keywords) FROM searches ORDER BY id ASC";



Leave Your Comments

Your Name
Your Email Address (Will Not Be Published)
Notify Me When Someone Replies to this Page
(An email will be sent to you when someone replies to your comments)
Your Comments
Include A Picture with your comments
Share
| More
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
BBCODE:
Subscribe Feeds
Webmasters - Exchange Links With Us. Add related websites to this topic
Add Link:
Links Related to : how to select unique rows from mysql distinct keyword query

Comments and replies About how to select unique rows from mysql distinct keyword query
(0) Comments