your ouput you gave does not look like repeated values.  The SQL I
gave just used standard joins .  Check out
http://www.w3schools.com/sql/default.asp
for some SQL basics.  Think of joins as set intersections, remember
set calculus?  :)

Doug

----- Original Message -----
From: daniel kessler <[EMAIL PROTECTED]>
Date: Mon, 20 Sep 2004 10:38:44 -0400
Subject: Re: relational display
To: CF-Talk <[EMAIL PROTECTED]>

>Try taking this a step at a time.  First get some SQL qith the data
>you want, then put it in CF with a CFDUMP, then workout the pretty
>output of the data.  Working on a few assumptions here perhaps, but
>take a stab at this
>
>SELECT r.*, a.*, p.*
>FROM fsnep_pollResults r, fsnep_pollAnswers a , fsnep_polls p
>WHERE p.p_id = r.pv_poll_id
>  AND p.p_id = a.pA_pollid
>  AND p.p_id = '#url.poll#'

Well, I believe that worked.  When I query the fsnep_pollResults table
for anything that has the poll id then I get 8 records.  When I do it
the way that you listed, I get 40 records with repeating values.  I
don't think that this is right because each set has the same 8 values,
but am not sure.
[#pV_id#] #pA_answer#
outptu:
[1]0 - 1
[2]0 - 1
[17]0 - 1
[20]0 - 1
[21]0 - 1
[19]0 - 1
[18]0 - 1
[22]0 - 1
[1]2-3
[2]2-3
[17]2-3
[20]2-3
[21]2-3
[19]2-3
[18]2-3
[22]2-3
etc.

Also, I don't really understand the query.________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to