bluesauceuk
Programmer
Hello,
I have a problem. I am writing a video list for home in CF. And am having no problems until today.
I have a table called films - this has its name, decription, director etc. But also contains three fields called genre1, genre2 and 3.
These are the ID numbers of the genre table. for example (1 is comedy, 3 is horror etc)
Now I can get one genre description to show, but not all three! How do I do it?
Here's the code:
-----------------
<cfquery name="getfilms" datasource="mousemedia2">
SELECT * FROM film, tape, genre
WHERE film.tapeid = tape.tapeid
AND film.genre1 = genre.genreid
</cfquery>
<!--- end query --->
<LINK REL="stylesheet" HREF="../css/crapvids2003.css" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<p><B>List Films</B> <BR>
</p>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Tape</td>
<td>Name</td>
<td>Actors</td>
<td>Genre</td>
<td>Year</td>
<td>Director</td>
<td>Duration</td>
<td>---</td>
</tr>
<cfoutput query="getfilms">
<tr>
<td>#getfilms.realnumber#</td>
<td>#getfilms.name#</td>
<td>#getfilms.Actor1#, #getfilms.Actor2#, #getfilms.Actor3#</td>
<td>(id nos: #getfilms.genre1# #getfilms.genre2# #getfilms.genre3#) what i want, but for all three #getfilms.description#</td>
<td>#getfilms.year#</td>
<td>#getfilms.director#</td>
<td>#getfilms.duration#</td>
<td> </td>
</tr>
</cfoutput>
</table>
I have a problem. I am writing a video list for home in CF. And am having no problems until today.
I have a table called films - this has its name, decription, director etc. But also contains three fields called genre1, genre2 and 3.
These are the ID numbers of the genre table. for example (1 is comedy, 3 is horror etc)
Now I can get one genre description to show, but not all three! How do I do it?
Here's the code:
-----------------
<cfquery name="getfilms" datasource="mousemedia2">
SELECT * FROM film, tape, genre
WHERE film.tapeid = tape.tapeid
AND film.genre1 = genre.genreid
</cfquery>
<!--- end query --->
<LINK REL="stylesheet" HREF="../css/crapvids2003.css" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<p><B>List Films</B> <BR>
</p>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Tape</td>
<td>Name</td>
<td>Actors</td>
<td>Genre</td>
<td>Year</td>
<td>Director</td>
<td>Duration</td>
<td>---</td>
</tr>
<cfoutput query="getfilms">
<tr>
<td>#getfilms.realnumber#</td>
<td>#getfilms.name#</td>
<td>#getfilms.Actor1#, #getfilms.Actor2#, #getfilms.Actor3#</td>
<td>(id nos: #getfilms.genre1# #getfilms.genre2# #getfilms.genre3#) what i want, but for all three #getfilms.description#</td>
<td>#getfilms.year#</td>
<td>#getfilms.director#</td>
<td>#getfilms.duration#</td>
<td> </td>
</tr>
</cfoutput>
</table>