I've got it, sorry!
<!--- find all feature that this author is authorised to
write about --->
<cfquery name="GetArticleFeatureTypes" datasource="user020">
SELECT authorFeaturesID, tbl_020authorFeatures.featureID,
tbl_020articleFeatures.featureID, authorID, featureName
FROM tbl_020authorFeatures, tbl_020articleFeatures
WHERE authorID = #client.authorID# AND
tbl_020articleFeatures.featureID = tbl_020authorFeatures.featureID
</cfquery>
It seems to work :)
On 25 Sep 2005, at 16:06, Saturday (Stuart Kidd) wrote:
> Hi,
>
> I have a table named tbl_020articleFeatures which has fields
> featureID and featureName.
>
> I also have a table named tbl_020authorDetails which has authorID as
> a field (as well as other stuff).
>
> I made a 'cross table' which is called tbl_020authorFeatures - this
> table will have rows to establish which authors are authorised to
> write which particular features. In here the fields I have are
> authorFeatureID, featureID and authorID.
>
> I am trying to write a query which will pull only the features which
> e particular author can write.
>
> At the moment I have it in 2 queries but i wouldn't be surprised if i
> could just have one:
>
> <!--- find all feature that this author is authorised to
> write about --->
> <cfquery name="GetAuthorFeatures" datasource="user020">
> SELECT authorFeaturesID, featureID, authorID
> FROM tbl_020authorFeatures
> WHERE authorID = #client.authorID#
> </cfquery>
>
> <!--- find all feature types --->
> <cfquery name="GetArticleFeatureTypes" datasource="user020">
> SELECT featureID, featureName
> FROM tbl_020articleFeatures
> WHERE featureID = '#GetAuthorFeatures.featureID#'
> ORDER by featureName ASC
> </cfquery>
>
> And at the moment this is only pulling the first feature ID.
>
> If anyone could be of any help i would be grateful.
>
> Thanks,
>
> Saturday
>
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219188
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