Jump to content


I bet you guys just LOVE all of my SQL questions!

  • Please log in to reply
1 reply to this topic

#1 DaveLinger

  • Members
  • PipPipPip
  • Advanced Member
  • 268 posts
  • LocationWV, USA

Posted 15 July 2006 - 11:24 PM

Here's another. I have game reviews listed in the table nuke_seccont (we're converting from PHP nuke to a hand coded layout, so we're using the reviews from where they are as opposed to moving 900+ reviews, for now.), and each row has the title, id, developer, publisher, etc. etc. On the review SEARCH page I'm working on, there is a drop down box with the developers and one with the publishers, to narrow your search. The problem is that there are dozens and dozens of developers/publishers and it would be a PITA to update the page every time a new developer or publisher were added. SO, I was thinking...

is there a way to get all the "developer" or "publisher" column (seperate queries, btw) results, sift out the duplicates, and then echo until there are none left?
dave at linger dot com

#2 AndyB

  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 15 July 2006 - 11:31 PM

SELECT DISTINCT column_name FROM table ... enjoy :)
Legend has it that reading the manual never killed anyone.
My site

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users