Garayed.com  

Go Back   Garayed.com > mySQL
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-24-2008, 02:59 AM
Potatora
 
Posts: n/a
Default One of each...?

I'm building yet another keyword/bookmarking application and there's
one kind of query that's eluding me. For brevity, let's say I have a
table with three fields... 'tag' and 'site' and 'id', There can be
duplicate entries for either 'tag' and 'site', but 'id' would be a
unique autoincrement value.

I'd like to have a query that extracts the last ten records, BUT with
the restriction that there can be no more duplicated values for
'tag'.

In use, I would be 'bookmarking' sites as I surfed the web, and in
practice I usually am interested in one particular topic for a while,
so in a day where I might bookmark 50 or 100 sites, the 'tag' values
will go into the database in bunches. So a query for say, the last ten
records, they might all have the same tag. I want to get the last ten
tags from the query.

Have I stated the problem clearly enough? I'm thinking it's probably
a "select distinct tag..." ??

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:18 AM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.