Skip to main content
Inspiring
October 29, 2012
Answered

looking a hello world example

  • October 29, 2012
  • 1 reply
  • 810 views

I am a very new ColdFusion.

I would like to have a very simple hello world example code and connection to backend database.

Your help and inforamtion is great appreciated,

Regards,

iccsi

    This topic has been closed for replies.
    Correct answer Aegis_Kleais

    <cfoutput>

    Hello World

    </cfoutput>

    Once you've created a Datasource that links to your database in the CF ACP, you can run and reference a query as such:

    <cfquery name="example" datasource="name_of_the_datasource">

    SELECT * FROM TABLENAME WHERE COLUMN = VALUE

    </cfquery>

    <p>This will show you a dump of the query</p>

    <cfdump var="#example#">

    <p>This tells you how many records were returned: #example.recordCount#</p>

    <p>This is how you reference a returned field: #example.name_of_field#</p>

    1 reply

    Inspiring
    October 29, 2012

    easycfm.com has entry level tutorials.

    Aegis_KleaisCorrect answer
    Inspiring
    October 29, 2012

    <cfoutput>

    Hello World

    </cfoutput>

    Once you've created a Datasource that links to your database in the CF ACP, you can run and reference a query as such:

    <cfquery name="example" datasource="name_of_the_datasource">

    SELECT * FROM TABLENAME WHERE COLUMN = VALUE

    </cfquery>

    <p>This will show you a dump of the query</p>

    <cfdump var="#example#">

    <p>This tells you how many records were returned: #example.recordCount#</p>

    <p>This is how you reference a returned field: #example.name_of_field#</p>

    iccsiAuthor
    Inspiring
    October 30, 2012

    Thanks a million for helping and information,

    Regards,

    iccsi,