What you are looking for is a report generator.  SQL queries will return
result sets in a "table" layout (since the fonts etc. messes up attempt at
tabulat layout, I'm presenting the data as comma separated):

(SeriesTitle, LinkTitle)
1, 1
1, 2
1, 3
2, 1
2, 2
3, 3

If the Series column in the Links table corresponds to the SeriesID column
in the Series table, you could write a query like:

SELECT S.SeriesTitle, L.LinkTitle
FROM Series as S
    INNER JOIN Links as L
    ON S.SeriesID = L.Series
ORDER BY S.SeriesID, L.LinkID

HTH,
Tore.

----- Original Message -----
From: "Mike Walth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 20, 2003 11:36 PM
Subject: Join or Group By?


> Hello:
>
> I'm fairly new to MySQL and think there is an easy query to get what I
need
> done, but not sure how to do it.  I thank everyone for their help in
> advance.
>
> I have two tables.
>
> Table1: Series
> SeriesID
> SeriesTitle
>
> Table2: Links
> LinkID
> Series
> LinkTitle
>
> I need a query that I can group the links by Series to generate a result
> similar to:
>
> SeriesTitle(1)
> LinkTitle(1)
> LinkTitle(2)
> LinkTitle(3)
>
> SeriesTitle(2)
> LinkTitle(1)
> LinkTitle(2)
> LinkTitle(3)
>
> Links.Series holds the value of SeriesID that it is under.
>
> Thanks again for your help.
>
> Mike Walth
> CinoFusion
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to