Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfcquery invalid attribute

Status
Not open for further replies.

gerendula

Programmer
Apr 17, 2006
13
GB
have cfquery error message advising invalid attribute

how do u determine correctattribute to use
 
The best way to check for valid attirbutes is to type cfquery into google, the top link is usualy the Macromedia LiveDocs, that will explain the tag and all its attributes.

This same process can be used for most of the CF Tags.

But as far as a query is concerned, a basic cfquery should contain 2 attributes, 1st should be 'name' this will be used to referance the query result when you output it, secondly set a 'datasourse' which is the name of your Datasource set in coldfusion administrator panel.

So, i have a datasource called 'mydatabase' so my basic query and output looks like this.

Code:
<cfquery name="query1" datasource="mydatabase">
SELECT * FROM tablename
</cfquery>

<cfoutput query="query1">
#field1# and #field2#
</cfoutput>

Let us have a look at your code and we'll be able to help more.

Rob
 
Woo ... nice find r937, i've not come accross that one before, thanks very much, that'll be top of my favourites list.

You're right, Livedocs is slow, i've just found it usefull as a quick referance to tags, but this new one could well be what i need.

If you're new to CF gerendula, you may want to check out some CF Tutorials, some of the most usefull ones i have found have been on also Kevin from these boards has his site, the link for which i dont have to hand which is also an excelent resource.

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top