Hi,
I'm working on a music discography site. The test version of which can be seen here... The best way to
see what I'm trying to accomplish is by searching for 'get loose' as a title on the search page (this is the only record in the database that is so far complete).
My SQL server database has 2 tables; LBPLATTERS & LBTRACKS. The LBPLATTERS table holds information that I consider to 'belong' to a physical piece of vinyl (such as artist, title, urls for sleeve and label scans, label name, country of issue, format (12" or LP) etc.
The LBTRACKS table contains info which I consider 'belongs' to a track.Such as ARTIST, TITLE, WRITER, PRODUCER,TRACK LENGTH etc.
Both tables use a column called PLID (platterid) to link tracks to whichever record they belong to and vice versa. I've not actually done anything in SQL to link these tables. (I don't know how to, or indeed if I need to).
It all works quite nicely at the moment, except that when you search for a TITLE on the search page, the recordset used is one formed from the LBPLATTERS table. (i.e. only platter titles are found, so you can't search for an LP track title). I want to be able to search both
tables for titles, and then display the parent record (i.e. the vinyl's LBPLATTERS record).
Does anybody know the SQL to do this? My current SQL is:
SELECT *
FROM dbo.lbplatters
WHERE artist LIKE '%MMColParam1%' and title LIKE '%MMColParam2%' and
label like '%MMColParam3' and year like '%MMColParam4%' and format
like '%MMColParam5%' and country like '%MMColParam6%'
I'm using Macromedia Ultradev as my development tool.
Thanks,
Jason.
SQL Novice.
I'm working on a music discography site. The test version of which can be seen here... The best way to
see what I'm trying to accomplish is by searching for 'get loose' as a title on the search page (this is the only record in the database that is so far complete).
My SQL server database has 2 tables; LBPLATTERS & LBTRACKS. The LBPLATTERS table holds information that I consider to 'belong' to a physical piece of vinyl (such as artist, title, urls for sleeve and label scans, label name, country of issue, format (12" or LP) etc.
The LBTRACKS table contains info which I consider 'belongs' to a track.Such as ARTIST, TITLE, WRITER, PRODUCER,TRACK LENGTH etc.
Both tables use a column called PLID (platterid) to link tracks to whichever record they belong to and vice versa. I've not actually done anything in SQL to link these tables. (I don't know how to, or indeed if I need to).
It all works quite nicely at the moment, except that when you search for a TITLE on the search page, the recordset used is one formed from the LBPLATTERS table. (i.e. only platter titles are found, so you can't search for an LP track title). I want to be able to search both
tables for titles, and then display the parent record (i.e. the vinyl's LBPLATTERS record).
Does anybody know the SQL to do this? My current SQL is:
SELECT *
FROM dbo.lbplatters
WHERE artist LIKE '%MMColParam1%' and title LIKE '%MMColParam2%' and
label like '%MMColParam3' and year like '%MMColParam4%' and format
like '%MMColParam5%' and country like '%MMColParam6%'
I'm using Macromedia Ultradev as my development tool.
Thanks,
Jason.
SQL Novice.