Skemcin 13 Posted February 13, 2008 Report Share Posted February 13, 2008 You need three tables:documentdoc_IDdoc_namedoc_description...categorycat_IDcat_namecat_description...document_x_categorydxc_IDdxc_doc_IDdxc_cat_ID... <cfquery name="qryGetDocs" datasource="#dbname#" username="#dbuser#" password="#dbpw#">SELECT doc_id, doc_name, doc_description, cat_nameFROM documentJOIN document_x_category ON dxc_doc_ID = doc_IDJOIN category ON cat_id = dxc_cat_idWHERE doc_id = #val(url.doc_ID)#ORDER BY cat_name</cfquery>...<hr><cfoutput query="qryGetDocs" group="cat_name"><strong>#cat_name#</strong><br /><cfoutput>#doc_name# <em>(#doc_ID#)</em><br />#doc_description#<br /><br /></cfoutput><hr></cfoutput> That should do it . . . Quote Link to post Share on other sites
Skemcin 13 Posted February 14, 2008 Report Share Posted February 14, 2008 P.S. take the "WHERE" clause out and it will list all your documents grouped by category. Quote Link to post Share on other sites
vchris 3 Posted February 21, 2008 Author Report Share Posted February 21, 2008 I'm done with the app! They're just gonna review it. I might have to add or change a couple things here and there but the hard work is done.I'm pretty happy about it. Quote Link to post Share on other sites
Skemcin 13 Posted February 21, 2008 Report Share Posted February 21, 2008 Nice:) Quote Link to post Share on other sites
vchris 3 Posted February 22, 2008 Author Report Share Posted February 22, 2008 Thanks for all your help buddy Quote Link to post Share on other sites
Skemcin 13 Posted February 22, 2008 Report Share Posted February 22, 2008 My pleasure. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.