> > As an illustration, say that users table has the following entries:
> > 
> > userID_fk     [1]
> > stationID_fk  [4]
> > checked       [0]
> > 
> > So here, the query will return only the value of the second and 
> forth 
> > row.
> 
> The forth row isn't checked. I'm assuming that's just a typo.  
> 
> If I'm understanding correctly you need to do a JOIN on the station id 
> and checked fields.  Something like this
> 
> SELECT        t2.cStationID, t2.customerID_fk, t2.stationID_fk, t2.checked
> FROM          firstTable t1 
        
> INNER JOIN secondTable t2 
>       ON t1.stationID_fk = t2.stationID_fk
>       AND t1.checked = t2.checked
> WHERE         t1.userID_fk = 123  --- or whatever the userid is 
> AND   t1.checked = 1
> 
 
That was awesome---you totally nailed it.

Thanks... you seriously saved my life.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283692
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to