OT: Outer Join grabbing too many records

2002-06-03 Thread Paul Giesenhagen
cfquery datasource=canadacrew name=listimages SELECT i.id, i.title,i.filename, cm.name FROM images i INNER JOIN image_categories c ON i.id = c.imageid LEFT OUTER JOIN comments cm ON cm.parent_id = i.id AND c.catid = '#variables.catid#' GROUP

Re: Outer Join grabbing too many records

2002-06-03 Thread stas
Move your c.catid = '#variables.catid#' into the WHERE clause. - Original Message - From: Paul Giesenhagen [EMAIL PROTECTED] cfquery datasource=canadacrew name=listimages SELECT i.id, i.title,i.filename, cm.name FROM images i INNER JOIN image_categories c ON

Re: Outer Join grabbing too many records

2002-06-03 Thread Dina Hess
I am running this query on MySQL, and the problem is that no matter what #variables.catid# Is, it always brings up every image .. Basically I want to bring up every image that is defined by the 'variables.catid' and if there are comments, display the comments for that image ..(Not every image

Re: Outer Join grabbing too many records

2002-06-03 Thread Paul Giesenhagen
If there are 10 comments, it just shows a 1 instead of a 10 for variables.comment_count. Thank You Paul Giesenhagen QuillDesign - Original Message - From: stas [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, June 03, 2002 10:25 AM Subject: Re: Outer Join grabbing too many

Re: Outer Join grabbing too many records

2002-06-03 Thread Paul Giesenhagen
Dunno .. it is working now ... disreguard! and THANKS for all the help! Paul Giesenhagen QuillDesign - Original Message - From: Paul Giesenhagen [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, June 03, 2002 10:49 AM Subject: Re: Outer Join grabbing too many records