Forums

This topic is locked

? How to display 1 record with duplicate title

Posted 16 Aug 2002 22:36:23
1
has voted
16 Aug 2002 22:36:23 Sloan Warner posted:
Touched upon many times I'm sure - but perhaps this instance is something new. I want to filter out entries in a recordset display that have the same title and format - but I want to retain the unique ID (Number) of the item that is left after the filter takes place. Using the 'DISTINCT' command assumes that all entries are unique because they all have a different ID. Is there a way to display the filtered record and retain it's particular unique ID? The reason I need to keep this ID is that the id is needed for a product display page.

Returned records look like this:

Format | Title |

DVD | Bob
DVD | Bob
DVD | Bob
DVD | Bob

Behind the scenes the 'Title' has a hyperlink that corresponds to a product display page - using the unique ID of the entry.

Basically - I have a simple SQL query that selects the proper data from the DB:

sql="SELECT FormatDescription, Title, Number FROM database ORDER BY Format_Description, Title ASC "

Hope that was clear ... Ideas?

Reply to this topic