You are missing the single quote after name.
 
Here is the fixed code:
 

<cfquery datasource="forums" name="addmember">
 insert into members
  ( Name, Email, Handle, login, password, allow, level, memberid )
 values
  (
  '#form.name#',
  '#form.email#',
  '#form.handle#',
  '#form.login#',
  '#form.password#',
  #allow#,
  '#level#',
  #nextid#
  )
</cfquery>

 

btw ... it helps if you separate the values with line breaks for clarity and syntax checking.

 

-- cheryl

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Andrew Green
Sent: Tuesday, March 19, 2002 5:28 PM
To: [EMAIL PROTECTED]
Subject: [CFTALKTor] Insert Statement

Can anyone see what I’m doing wrong here?

 

<cfquery datasource="forums" name="addmember">

insert into members(Name,Email,Handle,login,password,allow,level,memberid)

values('#form.name#,'#form.email#','#form.handle#','#form.login#','#form.password#',#allow#,'#level#',#nextid#)

</cfquery>

 

All but ALLOW and NEXTID are text. ALLOW and NEXTID are numbers. ( 1 and 2 respectively )

Cold fusion is saying there is a syntax error

 

 

Reply via email to