Hi, i have an <cfinclude>-Tag which includes...
# cfml-general
m
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?
z
you don't normally cfinclude a cfc?
m
Okay, so i have to use another way instead of
<cfinclude template="./cfc/module_the.cfc">
correct?
w
d
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
@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.
2
2