Jump to content


Photo

Getting SQL records to only show up once if there are multiples. Possible? DW MX


  • Please log in to reply
3 replies to this topic

#1 halcyonalt

halcyonalt
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 16 September 2006 - 03:09 AM

In Dreamweaver MX.

I am creating a link index of different written works. I want the different viewing options to be flexible, such as browsing through written works based on the title, based on the author, and whatnot.

I would like to create an author page, and I think I have most of it. I downloaded the Navigation suite so that I can use letters to help navigate.

The problem is, a lot of the written works are written by the same authors. One author's name will show up several times in the database. How do I make it so that it only shows up once when the results display?

If I can avoid coding, I would like to, because coding seriously baffles me. I am still very much a layman with PHP.

If I can get it to only show up once, I think my problems are solved. I know how to create detail pages and such. It's just that tricky problem of making sure that my page isn't filled up with the same author for one particular letter.

#2 AndyB

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

Posted 16 September 2006 - 03:40 AM

SELECT DISTINCT author ... would work in part of your query. I have no idea how DreamWeaver works.
Legend has it that reading the manual never killed anyone.
My site

#3 halcyonalt

halcyonalt
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 16 September 2006 - 03:51 AM

That was shockingly easy. Thank you! :D

#4 halcyonalt

halcyonalt
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 16 September 2006 - 04:48 AM

Urk, nevermind. It seems that once I introduce URL parameters into the query, it doesn't seem to want to work. I'm not sure why that is. The query works fine with the parameter without the DISTINCT tag on it, but once I add it, nothing shows up in the query. I don't even get an error message.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users