I tried this and I'm getting an error saying too few parameters expecting 2.
Dont know what that means though.

-----Original Message-----
From: Deanna Schneider [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 2:59 PM
To: CF-Talk
Subject: Re: Getting 4 results where there should be only 2


You need to join the two tables on whatever value they share:

SELECT    t1.* from
FROM     table1 t1, table2 t2
WHERE    t1.primarykey = t2.foreignkey

----- Original Message -----
From: "Phillip Perry" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, October 25, 2004 1:45 PM
Subject: Getting 4 results where there should be only 2


> When I do something like this...
>
> <cfquery datasource=#mydbname# name="getinfo">
> SELECT *
> FROM Table1,Table2
> </cfquery>
>
> and there are only 2 records to show, the output shows those 2 records
> twice. I'm assuming that its becuase there are 2 tables so it shows it
> twice. How do I get around this? This page is independant and has no
> variables passed to it from urls or forms.
>
>
>
>
>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
The annual ColdFusion User Conference is being held Sat 6/26 - Sun 6/27/04 8am-5pm in 
the Washington DC Area. 
http://www.houseoffusion.com/banners/view.cfm?bannerid=44

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182529
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to