Hmm... I dont think CFMX translates queries into structures
if you try #isStruct("queryName")# it comes back with "NO"
sounds like there is something mysterious goin on you setup.
Joe


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 7:43 PM
To: CF-Talk
Subject: CFMX strange syntax required to output a query [crosspost]


I am finally getting around to playing with CFMX and various DBs --
something I should have done during the beta.

The example problems furnished with CFMX  Linux and PointBase db all run
as expected, as did MySQL and PostgreSQL.

Actually it is running on the Mac OS X port of CFMX Linux

Today I installed OpenBase & tried to run a simple program.  It failed.

By experimentation, I found that the results were being returned as a
recordset structure rather than as a query.

This means that you require a different syntax to  refer to the query
fields in a

        <cfoutput query="queryName">

tag

Instead of #ColumnName#  you must use #queryName.TableName.ColumnName#

So the simple query


        <cfquery name="getPhone" datasource="Company">
          SELECT    Company, mainPhone
          FROM        Company
          ORDER BY  Company
        </cfquery>

        <table border="1" cellspacing="0" cellpadding="3">

requires the following output notation

        <cfoutput query="getPhone">
          <tr>
                <td>#getPhone.Company.company#</td>
                <td>#getPhone.Company.mainPhone#</td>
          </tr>
        </cfoutput>

        </table>

instead of the simpler (preferred)

        <cfoutput query="getPhone">
          <tr>
                <td>#company#</td>
                <td>#mainPhone#</td>
          </tr>
        </cfoutput>

        </table>

the "getPhone.Company." qualification appears redundant, but the
template won't run without it

What's going on here and where is it documented?

TIA Dick


______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to