Questions tagged [cfquery]

`` is the primary method of executing database queries and query-of-queries (QoQ) in ColdFusion/CFML.

<cfquery> is the primary method of executing database queries and query-of-queries (QoQ) in ColdFusion/CFML. The <cfquery> tag's more common attributes include:

  • name - The name by which the query will be referred in code.
  • datasource - The data source against which the query is to be executed. Conflicts with dbtype.
  • dbtype - Used with a value of query for query-of-queries (QoQ) and with a value of hql for ORM. Conflicts with datasource.
  • cachedwithin - The time span for which the query results should be cached. Note: ColdFusion caches queries according to the name and text of the query; if either changes, the query will not be cached.
  • maxrows - The maximum number of rows to be returned from the query. Use -1 to return all rows. Note: This does not affect caching (see cachedwithin above); if maxrows is changed on a cached query, the query will still return the number of rows returned when it was first cached.
  • timeout - The number of seconds ColdFusion should wait before timing out the query. If <cfsetting requesttimeout="*xxx*" /> is used, will override that value if the timeout specified for the query is used.

Also see:

(Please see the tag's documentation for additional attributes and their explanation.)

246 questions
0
votes
2 answers

check the result of a CFQUERY via CFIF statement

I am having an issue with the sytnax on how to get a value from a database and then check that value in an if statement in ColdFusion This is what I have so far: SELECT comp_type FROM…
Denoteone
  • 4,043
  • 21
  • 96
  • 150
0
votes
0 answers

CFQuery - Update a table by comparing it to another table

I have a perplexing problem that I am finding difficult to work through. I have 2 tables in my MYSQL database containing similar data. I'll outline just the pertinent information. Table1 - ezpay_Usage Columns: ticket_ID date_opened date_closed - No…
Brian Fleishman
  • 1,237
  • 3
  • 21
  • 43
0
votes
1 answer

Form.AutoEngineer not being recognized

so, I updated a lot in with this code from the casing, the hidden input field. I have not been able to change the validation or work on SQL Injections, but I am getting there. I am having 2 main problems and they both deal with elements not beinga…
SinceForever
  • 232
  • 1
  • 2
  • 12
0
votes
2 answers

ColdFusion Multiple cfif conditions only returns the 1st condition

I am new to ColdFusion and have to make a edit page that will both update and track the changes made to a table; while passing the logged in AD user to the database. Environment: DB: SQL 2008 R2 OS: Windows 8 Server: ColdFusion 8 Tables…
ASheppardWork
  • 95
  • 1
  • 2
  • 12
0
votes
0 answers

ColdFusion cfc cfquery fails when encrypting a credit card string

I have a form in a .cfm page that uses jquery to validate the form and pass the values on to a ColdFusion cfc via .ajax. That all works. The following is my component code stripped down to show just the pertinent issue.
TheRanch
  • 23
  • 7
0
votes
2 answers

why isn't this coldfusion query not working?

I am having an issue with trying to update an SQL table with this cfquery. Here is the code in cold fusion: UPDATE users …
Sovr Sov
  • 196
  • 3
  • 17
0
votes
2 answers

SQL IN - Variable inside of table column?

I know how to check for the value of a table column inside a variable list, like so: Select a From b Where c In (
Banny
  • 811
  • 4
  • 13
  • 36
0
votes
1 answer

Output doesn't update when calling a cfc function

Creating a ColdFusion function to handle the report outputs based on the varieties of 10 groupings. The output shows data grouping and amounts correctly, but it doesn't have correct report heading. For instance, it should have 5 different building…
tigerpuzzle
  • 69
  • 2
  • 8
0
votes
2 answers

Updating multiple rows from a cfquery recordset

Is there a way to update multiple rows of data when the data coming in is from the result of a CFQuery? Currently this run multiple times. Is there a way to do it in one uqery operation?
James A Mohler
  • 11,060
  • 15
  • 46
  • 72
0
votes
0 answers

ColdFusion Multiple Queries Getting Confused Returning Wrong Values

I'm developing an API which searches for player cards to buy in FIFA 14. I'm making 600 individual requests per minute for around 15 different Players spread over 3 different pages with each individual request returning up to a maximum of 50…
CPB07
  • 679
  • 3
  • 13
  • 23
0
votes
3 answers

Can Coldfusion use Java methods/objects to get better cfquery performance?

I am wondering if there are java methods/objects that would be alternatives to cfquery, that both allow variable sanitation, and better caching methods. I know that you can use information schema to get data types and char lengths, and then use that…
crosenblum
  • 1,869
  • 5
  • 34
  • 57
0
votes
2 answers

Unable to access JavaScript variables in ColdFusion tags in script

I was trying to take the selected value from the select tag and pass it to cold fusion tags in jquery as follows. select tag code: jQuery…
uvk
  • 43
  • 7
0
votes
1 answer

Variable as SQL in cfquery

I have a table that is storing SQL as one of its elements. I need to be able to run that stored SQL query, but can't figure out how to do it. So far, I'm using the following method:
stmcallister
  • 1,682
  • 1
  • 12
  • 21
0
votes
1 answer

coldfusion cfquery.getMetaData()

I have a simple cfquery object: select top 5 * from table When I do a dump of getP.getMetaData(), I clearly see getPrecision(int) in the method list. Though, when I perform…
PoeHaH
  • 1,936
  • 3
  • 28
  • 52
0
votes
2 answers

cfmail group attribute throws error

I have a query which returns multiple results with just data in one column as different for a particular report number. I want to group the results for one report number and send an email to one person for all the action items. Below is my…
amsko
  • 111
  • 2
  • 15