Hi, i have an <cfinclude>-Tag which includes a *.cfc File. Now I get the SQL Querys from the cfquery-Tag which includes in the cfc file under "cfcomponent"-Tag as Plain Text on the Website... What i do wrong here?
Besides learning CF, you should use either <cfobject> or creaetObject(script). Once the object is instantiated you can run your function and get the results returned to you.
s
Scott Bennett
03/04/2022, 6:12 PM
@Manta specifically you should review http://learncfinaweek.com/course/index/section/Code_Reuse/item/Includes and http://learncfinaweek.com/course/index/section/Code_Reuse/item/Components to ensure that you understand the difference between using cfinclude to re-use code, and using CFCs. I would also read the "functions" and "custom tags" pages of the "code reuse" section on learcfinaweek... Typically CFCs are the primary way you re-use code these days, but the others still have their uses in various scenarios. It is important to understand their distinctions though so that you can choose what is right for your application.