I take it your user_id values are character ('user1').

<CFQUERY name="getUser" datasource="yourdatasource">
        Select user_id
                from users
                        where user_id EQ '#form.user_id#'
</CFQUERY>



<CFIF getUser.recordcount>
        Sorry, <cfoutput>#form.user_id#</cfoutput> is already in use.
<CFELSE>
        create account code
</CFIF>



<CFIF form.user_id EQ queryname.userID>
etc.

-----Original Message-----
From: HappyToad.com [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 12, 2000 2:08 PM
To: CF-Talk
Subject: cfif help???


I am trying to set up a form that compares the form field user_id to the
database.  Here is what I have written:

<cfif '#user_id#'=#user_id#>
Sorry User ID is Taken
<cfelse>

<!---Create New User--->
<cfinclude template="create_user.cfm">

</cfif>

I am getting an error saying:
Error Diagnostic Information
InsideText

Cannot convert user1 to boolean.

user1 is what was entered as user id on the form page.

Any ideas,
Rich


----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to