If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Query on combining queries

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-12-04, 01:24
azavas azavas is offline
Registered User
 
Join Date: Jan 2003
Posts: 7
Question Query on combining queries

Hello good people.

Here is the situation.

I have clubs that have bands playing them

I have bands, some of which have songs on my site, some don't.

I want to be able to generate a list of clubs, then show the band playing there. if the band has a song, I want to show it right after their name.


I have two queries, each of which works.

<cfquery name="get_bands_with_their_clubs" datasource="#datasourceforreal#" dbtype="ODBC">select clubcountry,clubstate,clubcity,bandname,clubname,m onthofshow,dayofshow from band,clubs,showdates
where clubid = showclubid
and bandid =showdatesbandid and verified = 'y'
</cfquery>

<cfquery name="get_bands_with_their_songs" datasource="#datasourceforreal#" dbtype="ODBC">
select song
from songs,band,album
where bandid = albumbandid
and songalbumid = albumid
and posted = 'y'
</cfquery>

But i can't seem to output them both at the same time.

would like to do something like

<cfoutput query="????">

#clubname# #bandname# #song# </cfoutput>

Am using ms access, cold fusion 5...

Any ideas would be greatly appreciated.

Tony

www.LocalMusicDirect.com

Last edited by azavas; 05-12-04 at 01:26.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On