Let me try to explain what I trying to accomplish a little bit better. I'm not sure if cfcs can do this. Documentation seems to make me think that they can.
In my test.cfm I have the following: <cfoutput>#qryWINDOWS.recordcount#</cfoutput> <cfoutput>#qryLINUX.recordcount#</cfoutput> I'm using the following query from a cfinclude action.cfm (contains multiple queries). <!---Query for Windows OS---> <cfquery datasource="#APPLICATION.dsn#" name="qryWINDOWS"> SELECT * FROM stats WHERE os = 'WINDOWS' </cfquery> <!---Query for Linux OS---> <cfquery datasource="#APPLICATION.dsn#" name="qryLINUX"> SELECT * FROM stats WHERE os = 'LINUX' </cfquery> How can I accomplish this without using mulitiple queries for LINUX, MAC, UNIX, etc.., using a cfc? I'm new to the cfcs and after reading the documentation, It looks like the above is possible, plus I can cut down on my code. I would assume I could use variable(s) as follows: <cfquery datasource="#APPLICATION.dsn#" name="qryOS"> SELECT * FROM stats WHERE #var1# = #var2# </cfquery> How would I pass #var1# and #var2# from my cfm to the cfc? Any examples would be great. How I display the return recordcount would be great as well. By the way, the output takes place on the same cfm (test.cfm). ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------