User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 332,689 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,426 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:

<cfquery> Undefined

Join Date: Feb 2008
Posts: 16
Reputation: zoid777 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
zoid777 zoid777 is offline Offline
Newbie Poster

<cfquery> Undefined

  #1  
Mar 27th, 2008
I need some help with <cfquery>, I want to authenticate an add form so the user doesn't enter the same value twice or more so I used recordcount like this

  1. <cfquery name="cool.recordcount" datasource="#Request.proto#">
  2. <cfif cool EQ 0>
  3. INSERT INTO proton(
  4. name,
  5. moon
  6. )
  7. VALUES(
  8. '#Trim(Form.name)#',
  9. '#Trim(Form.moon)#',
  10. )
  11. <cfif cool EQ 0>
  12. <cfelse>
  13. THIS RECORD ALREADY EXIST
  14. <cfinclude template="adduser.cfm">
  15. </cfif>
  16. </cfquery>

but it throws an error like Variable COOL is undefined. I am also using anplication.cfm Application.cfm also in my form, is their anything you can see I am doing wrong or do I have to define the query name cool, it is already defined in the cfquery?
Last edited by peter_budo : Mar 30th, 2008 at 5:35 am. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 4:59 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC