Ask a Question related to Coldfusion Database Access, Design and Development.
-
nedflanders #1
question about SQL query and cfoutput with INNER JOIN
I have a query that pulls data from two related tables (an Article Table and a
Photo table, linked by ArticleID) Lets say i have 3 photos that are related to
aricleID 1 (articleid is unique and there is only one article with that ID).
when i run the query i get 3 rows returned, this is becuase there is 3 photos.
Now, i want to output that data in a cfoutput but when i do i get 3 records
written to the page. My questions is; how do i supress the article from being
output 3 times but allow me to output all 3 associated photos?
Hope this makes sense
thanks!
nf
Sample Query
SELECT Articles_MyGVegas.ArticleID, Articles_Photo.PhotoID,
Articles_Photo.Photo_Name, Articles_MyGVegas.Headline
FROM Articles_MyGVegas INNER JOIN
Articles_Photo ON Articles_MyGVegas.ArticleID =
Articles_Photo.ArticleID
Output
articleID headline photoid
1 test 6
1 test 7
1 test 8
nedflanders Guest
-
INNER JOIN query question
I have 2 tables with the following columns (other data fields omitted for brevity): cases.caseid cases.uid profiles.uid profiles.locationid... -
CFOUTPUT QUERY rowcount = 0
Hello, I have a query which return 0 row. I have a CFOUTPUT QUERY which try to output my query. Coldfudion enter in the CFOUTPUT once EVEN if my... -
<cfoutput query> and TABLE formatting
HI, I'm trying to output images from a database using <cfoutput query>. That part works fine. But the images display all in one column, one... -
Query, view join question.
Hi Tom, I could give you access to the database itself if needed. But these are the actual tables and view. I hope I will never make any tpo's... -
Query, view join question.
Hi all, I have 2 tables: table1 with the columns objectid, refobjectid, commonvaluecol and value1. table2 with the columns objectid,... -
rmorgan #2
Re: question about SQL query and cfoutput with INNERJOIN
Have you tried the grouping attribute for cfoutput? that may work.
rmorgan Guest
-
nedflanders #3
Re: question about SQL query and cfoutput with INNERJOIN
alright, thats it.
Thanks!
nedflanders Guest



Reply With Quote

