Thanks for the reply, Matt...

Nope, removing the single quotes didn't help...

Haven't tried rewording the query...I'll save that for later...

I was trying to avoid getting deeply into the problem because
all the queries, etc., involved would take too long to show
and work through.

The basic problem is that I have a page that displays client
information according to a URL.Client_ID variable that is passed
to the page via one outside page or by clicking a link which goes
back to the same page the link is on.  (Refreshing the same page
with new URL variables).  But the information refreshed on the page
seems to be disconnected from the information the queries should
be providing.  For instance, I can see (and test with output) that the
Client_ID is changing, both in the URL and in the Session.Client_ID
variable, but the data related to those variables in the query doesn't
change.

This page is simply a revamped interface of an app that was working
fine with these queries and this approach to information display.

Basically, the key variables change, but the queries don't seem to
be getting the news...

Rick

-----Original Message-----
From: Matt Williams [mailto:[EMAIL PROTECTED]
Sent: Friday, March 31, 2006 1:16 PM
To: CF-Talk
Subject: Re: Anything inherently wrong with this query?


What error are you getting? Or is it just bad data?

If your Client_ID fields are numeric, then you shouldn't have quote marks
around them.

I usually do inner joins as follows...

Select C.*, FG.*, E.*
from clients C
  inner join family_groups FG on C.Family_ID = FG.Family_ID
  inner join employers E on C.Employer_ID = E.Employer_ID
where C.Family_ID =
                        ( Select Family_ID
                        from clients
                       where Client_ID = '#Session.Client_ID#')
                         and C.Employer_ID =
                             ( Select Employer_ID
                                 from clients
                                where Client_ID = '#Session.Client_ID#')

On 3/31/06, Rick Faircloth <[EMAIL PROTECTED]> wrote:
>
> Hi, all...
>
> I've been wrestling with what should be a simple problem
> for too many hours...I've got to break things down and
> re-evaluate.  Thought some more eyes might help.
>
> Anything inherently wrong with this?
>
> Rick
>
>           <CFQUERY Name="Get_Client" Datasource="#DSN#">
>
>                Select C.*, FG.*, E.*
>                    from clients C
>            inner join family_groups FG, employers E
>                    on C.Family_ID = FG.Family_ID
>                   and C.Employer_ID = E.Employer_ID
>                 where C.Family_ID =
>                          ( Select Family_ID
>                          from clients
>                         where Client_ID = '#Session.Client_ID#')
>                           and C.Employer_ID =
>                               ( Select Employer_ID
>                                   from clients
>                                  where Client_ID = '#Session.Client_ID#')
>
>           </CFQUERY>
>
>
>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236710
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to