• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Error Executing Database Query.

New Here ,
May 01, 2013 May 01, 2013

Copy link to clipboard

Copied

Hi I am getting this error.

Error Executing Database Query.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

This is my Code

<cfoutput><cfset jobappid = '#appfirstname##form.applastname##DateFormat(Now(), "mmm-dd-yyyy")#'>

#jobappid#<br>

<cfset appdate= '#DateFormat(Now(), "yyyy-mmm-dd")#'>

</cfoutput>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)

          VALUES('#jobappid#')

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appphone#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstreet#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appcity#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstate#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appzip#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.fulltime#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.eighteen#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appposition#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previous#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previousdate#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.available#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.experiences#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.crime#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsaddres#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hssubjects#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsyears#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsgrad#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsdiploma#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeaddres#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegesubjects#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeyears#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegegrad#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegediploma#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techaddres#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techsubjects#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techyears#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techgrad#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techdiploma#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q1#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q2#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q3#"/>

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company1#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone1#"/>

     <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.empfromdate1#"/>

     <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.emptodate1#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage1#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage1#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave1#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor1#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description1#"/>

)

</CFQUERY>

<cfif not #form.company2# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#')

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company2#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone2#"/>

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate2#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage2#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage2#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave2#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor2#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description2#"/>

</CFQUERY>

</cfif>

<cfif not #form.company3# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#')

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company3#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone3#"/>

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate3#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage3#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage3#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave3#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor3#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description3#"/>

</CFQUERY>

</cfif>

<cfif not #form.company4# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#')

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company4#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone4#"/>

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate4#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage4#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage4#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave4#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor4#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description4#"/>

</CFQUERY>

</cfif>

<cfif not #form.company5# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#')

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company5#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone5#"/>

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate5#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage5#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage5#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave5#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor5#"/>

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description5#"/>

</CFQUERY>

</cfif>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#')

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref1#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress1#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone1#"/>

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#')

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref2#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress2#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone2#"/>

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#')

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref3#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress3#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone3#"/>

</CFQUERY>

<cfmail to="doug@.com"  from="jobApp@.com" subject=".com Job Application" type="HTML">

                                        <font face="Verdana,Geneva,Arial,Helvetica,sans-serif" size="-1"><strong>

                <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/><cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>          </strong> has applied for a position:<br>

                                                  <br>

                                                  <b>Date Applied: </b><cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.appdate#"/><br>

                                                  Go to the admin section to review this application.

                                                  </cfmail>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<link rel="stylesheet" href="style.css">

          <title></title>

</head>

<body>

<div align="center"><img src="images.gif" alt="" width="135" height="89" border="0"><p><br><br><br>

<h2>Your Application has been Processed Completely.</h2><br><br>

<form>

<input style="background-color: 069;

          border-color: ccc;

          font-family : verdana, Arial, Helvetica, sans-serif;

font-weight:          bold;

font-size:          10px;

color: #fff;" type=button value="Close This Window" onClick="javascript:window.close();">

</form></div>

</html>

</body>

Views

6.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 01, 2013 May 01, 2013

Copy link to clipboard

Copied

INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)

          VALUES('#jobappid#')

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>

You insert "jobappid, appdate", but the values you supply are "jobappid, appfirstname".

Also, only jobappid is within the ( and the ) of your VALUES statement.  There are no commas between values.  For all queries.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 02, 2013 May 02, 2013

Copy link to clipboard

Copied

So what you are saying is I should put my query params inside of the ('   ') and place comas between the query params?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 08, 2013 May 08, 2013

Copy link to clipboard

Copied

So what you are saying is I should put my query params inside of the ('   ') and place comas between the query params?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 08, 2013 May 08, 2013

Copy link to clipboard

Copied

Sorry for the delay.  Almost.

INSERT into tableName(column1,column2,column3)

VALUES(<cfqueryparam value="#value1#" cfsqltype="cf_sql_varchar">,

                   <cfqueryparam value="#value2#" cfsqltype="cf_sql_varchar">,

                   <cfqueryparam value="#value3#" cfsqltype="cf_sql_varchar">)

When using cfqueryparam, CF will determine the datatype automatically and will use apostrophes when necessary.)

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied


I now got this error

Error Executing Database Query.

Column count doesn't match value count at row 1

<cfoutput><cfset jobappid = '#appfirstname##form.applastname##DateFormat(Now(), "mmm-dd-yyyy")#'>

#jobappid#<br>

<cfset appdate= '#DateFormat(Now(), "yyyy-mmm-dd")#'>

</cfoutput>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appphone#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstreet#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appcity#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstate#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appzip#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.fulltime#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.eighteen#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appposition#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previous#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previousdate#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.available#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.experiences#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.crime#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsaddres#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hssubjects#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsyears#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsgrad#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsdiploma#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeaddres#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegesubjects#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeyears#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegegrad#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegediploma#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techaddres#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techsubjects#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techyears#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techgrad#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techdiploma#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q1#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q3#"/>)

   

   

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

     VALUES(<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone1#"/>,

     <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.empfromdate1#"/>,

     <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.emptodate1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description1#"/>)

</CFQUERY>

<cfif not #form.company2# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone2#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description2#"/>)

  

</CFQUERY>

</cfif>

<cfif not #form.company3# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company3#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone3#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate3#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description3#"/>)

   

</CFQUERY>

</cfif>

<cfif not #form.company4# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company4#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone4#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate4#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description4#"/>)

</CFQUERY>

</cfif>

<cfif not #form.company5# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company5#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone5#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate5#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description5#"/>)

</CFQUERY>

</cfif>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref1#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress1#"/>,

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone1#"/>)

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress2#"/>,

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone2#"/>)

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref3#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress3#"/>,

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone3#"/>)

</CFQUERY>

<cfmail to="doug@"  from="jobApp@" subject=" Job Application" type="HTML">

                                        <font face="Verdana,Geneva,Arial,Helvetica,sans-serif" size="-1"><strong>

                <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/><cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>          </strong> has applied for a position:<br>

                                                  <br>

                                                  <b>Date Applied: </b><cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.appdate#"/><br>

                                                  Go to the admin section to review this application.

 

                                                  </cfmail>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<link rel="stylesheet" href="style.css">

          <title> Job Application Submitted</title>

</head>

<body>

<div align="center"><img src="images/.gif" alt="" width="135" height="89" border="0"><p><br><br><br>

<h2>Your Application has been Processed Completely.</h2><br><br>

<form>

<input style="background-color: 069;

          border-color: ccc;

          font-family : verdana, Arial, Helvetica, sans-serif;

font-weight:          bold;

font-size:          10px;

color: #fff;" type=button value="Close This Window" onClick="javascript:window.close();">

</form></div>

</html>

</body>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

I count 36 columns in the INSERT portion, but only 35 columns of VALUES.  You're short one value.

^_^

UPDATE: You're short one VALUE in each query.  Also, I recommend putting the jobappid in cfqueryparam, too.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

Was missing appdate. but now I get this error again. stumped

Error Executing Database Query.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'leave, supervisor, description) VALUES('dfgf', 'dd', '2004-' at line 1

<cfoutput><cfset jobappid = '#appfirstname##form.applastname##DateFormat(Now(), "mmm-dd-yyyy")#'>

#jobappid#<br>

<cfset appdate= '#DateFormat(Now(), "yyyy-mmm-dd")#'>

</cfoutput>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)

          VALUES('#jobappid#','#appdate#',

   

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appphone#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstreet#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appcity#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstate#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appzip#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.fulltime#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.eighteen#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appposition#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previous#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previousdate#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.available#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.experiences#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.crime#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsaddres#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hssubjects#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsyears#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsgrad#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsdiploma#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeaddres#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegesubjects#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeyears#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegegrad#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegediploma#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techaddres#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techsubjects#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techyears#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techgrad#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techdiploma#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q1#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q3#"/>)

   

   

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

     VALUES(<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone1#"/>,

     <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.empfromdate1#"/>,

     <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.emptodate1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description1#"/>)

</CFQUERY>

<cfif not #form.company2# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone2#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description2#"/>)

  

</CFQUERY>

</cfif>

<cfif not #form.company3# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company3#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone3#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate3#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description3#"/>)

   

</CFQUERY>

</cfif>

<cfif not #form.company4# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company4#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone4#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate4#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description4#"/>)

</CFQUERY>

</cfif>

<cfif not #form.company5# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company5#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone5#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate5#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description5#"/>)

</CFQUERY>

</cfif>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref1#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress1#"/>,

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone1#"/>)

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress2#"/>,

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone2#"/>)

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref3#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress3#"/>,

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone3#"/>)

</CFQUERY>

<cfmail to="doug@"  from="jobApp@.com" subject=".com Job Application" type="HTML">

                                        <font face="Verdana,Geneva,Arial,Helvetica,sans-serif" size="-1"><strong>

                <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/><cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>          </strong> has applied for a position:<br>

                                                  <br>

                                                  <b>Date Applied: </b><cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.appdate#"/><br>

                                                  Go to the admin section to review this application.

 

                                                  </cfmail>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<link rel="stylesheet" href="style.css">

          <title></title>

</head>

<body>

<div align="center"><img src="images/" alt="" width="135" height="89" border="0"><p><br><br><br>

<h2>Your Application has been Processed Completely.</h2><br><br>

<form>

<input style="background-color: 069;

          border-color: ccc;

          font-family : verdana, Arial, Helvetica, sans-serif;

font-weight:          bold;

font-size:          10px;

color: #fff;" type=button value="Close This Window" onClick="javascript:window.close();">

</form></div>

</html>

</body>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

All of your smaller queries are still mismatched in column count vs value count.

The error message is specific to one of the smaller queries.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

I belive i have all the counts equaled up and i still get this

Error Executing Database Query.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'leave, supervisor, description) VALUES('MattMay-09-2013', 'sdads',' at line 1

<cfoutput><cfset jobappid = '#appfirstname##form.applastname##DateFormat(Now(), "mmm-dd-yyyy")#'>

#jobappid#<br>

<cfset appdate= '#DateFormat(Now(), "yyyy-mmm-dd")#'>

</cfoutput>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)

          VALUES('#jobappid#','#appdate#',

   

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appphone#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstreet#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appcity#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstate#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appzip#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.fulltime#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.eighteen#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appposition#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previous#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previousdate#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.available#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.experiences#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.crime#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsaddres#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hssubjects#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsyears#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsgrad#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsdiploma#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeaddres#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegesubjects#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeyears#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegegrad#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegediploma#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techaddres#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techsubjects#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techyears#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techgrad#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techdiploma#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q1#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q3#"/>)

   

   

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

     VALUES('#jobappid#',

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone1#"/>,

     <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.empfromdate1#"/>,

     <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.emptodate1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor1#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description1#"/>)

</CFQUERY>

<cfif not #form.company2# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone2#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate2#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employtodate2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor2#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description2#"/>)

  

</CFQUERY>

</cfif>

<cfif not #form.company3# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company3#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone3#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate3#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employtodate3#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor3#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description3#"/>)

   

</CFQUERY>

</cfif>

<cfif not #form.company4# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company4#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone4#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate4#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employtodate4#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor4#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description4#"/>)

</CFQUERY>

</cfif>

<cfif not #form.company5# is "">

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company5#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone5#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate5#"/>,

    <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employtodate5#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor5#"/>,

     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description5#"/>)

</CFQUERY>

</cfif>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref1#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress1#"/>,

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone1#"/>)

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref2#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress2#"/>,

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone2#"/>)

</CFQUERY>

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>

          INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

          VALUES('#jobappid#',

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref3#"/>,

    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress3#"/>,

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone3#"/>)

</CFQUERY>

<cfmail to="doug@"  from="jobApp@" subject=" Job Application" type="HTML">

                                        <font face="Verdana,Geneva,Arial,Helvetica,sans-serif" size="-1"><strong>

                <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/><cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>          </strong> has applied for a position:<br>

                                                  <br>

                                                  <b>Date Applied: </b><cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.appdate#"/><br>

                                                  Go to the admin section to review this application.

 

                                                  </cfmail>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<link rel="stylesheet" href="style.css">

          <title>ob Application Submitted</title>

</head>

<body>

<div align="center"><img src="images" alt="" width="135" height="89" border="0"><p><br><br><br>

<h2>Your Application has been Processed Completely.</h2><br><br>

<form>

<input style="background-color: 069;

          border-color: ccc;

          font-family : verdana, Arial, Helvetica, sans-serif;

font-weight:          bold;

font-size:          10px;

color: #fff;" type=button value="Close This Window" onClick="javascript:window.close();">

</form></div>

</html>

</body>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

Nothing jumps out at me, so if i were debugging this I'd start by putting in a cfdump of the form data at the top, to see what the data looks like, and also put some sort of message after each of the cfif statements so that I could see which block of code it is in when it throws that error.  BTW, you don't need those hash marks around the form var name in the CFIFs.

-reed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

Yeah.. might be a stray apostrophe, or something else breaking the string delimiting.  Of course CFDUMP would also give you which LINE the error is on.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

I am not sure i did the dump right but i put <cfdump at the begining and the > at the end of my code and got this.

Invalid token c found on line 3 at column 2.

The CFML compiler was processing:

  • A cfdump tag beginning on line 1, column 2.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

No.  Just curious.. how long have you been coding CF??

<cfdump var="#form#" expand="yes" /> <cfabort> at the top of the page will dump the form variables and stop the page from processing, giving you a look at the form data.

If you put everything in between <cftry> and <cfcatch><cfdump var="#cfcatch#"></cfcatch></cftry> then you'll get more detailed error messages.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

Not very long. I am a designer and got this dumped in my lap gotta work my way through it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

This is what i got

struct
APPCITYgfg
APPFIRSTNAMEdfg
APPLASTNAMEdfg
APPMIDDLENAMEdfg
APPPHONEgdf
APPPOSITIONdfgf
APPSTATEWI
APPSTREETfdg
APPZIPgfdfd
AVAILABLEfdsfd
BUSPHONE1sdf
BUSPHONE2[empty string]
BUSPHONE3[empty string]
BUSPHONE4[empty string]
BUSPHONE5[empty string]
COLLEGEADDRES[empty string]
COLLEGEDIPLOMA[empty string]
COLLEGEGRADNo
COLLEGESUBJECTS[empty string]
COLLEGEYEARS[empty string]
COMPANY1sdfsd
COMPANY2[empty string]
COMPANY3[empty string]
COMPANY4[empty string]
COMPANY5[empty string]
CRIMEYes
DESCRIPTION1Description of Duties:fsdf
DESCRIPTION2Description of Duties:
DESCRIPTION3Description of Duties:
DESCRIPTION4Description of Duties:
DESCRIPTION5Description of Duties:
EIGHTEENYes
EMPFROMDATE112/2004
EMPFROMDATE2[empty string]
EMPFROMDATE3[empty string]
EMPFROMDATE4[empty string]
EMPFROMDATE5[empty string]
EMPTODATE112/2005
EMPTODATE2[empty string]
EMPTODATE3[empty string]
EMPTODATE4[empty string]
EMPTODATE5[empty string]
ENDWAGE115
ENDWAGE2[empty string]
ENDWAGE3[empty string]
ENDWAGE4[empty string]
ENDWAGE5[empty string]
EXPERIENCESsdffsd
FIELDNAMESAPPFIRSTNAME,APPMIDDLENAME,APPLASTNAME,APPPHONE,APPSTREET,APPCITY,APPSTATE,APPZIP,FULLTIME,EIGHTEEN,APPPOSITION,PREVIOUS,PREVIOUSDATE,AVAILABLE,EXPERIENCES,CRIME,COMPANY1,EMPFROMDATE1,EMPTODATE1,STARTWAGE1,ENDWAGE1,LEAVE1,SUPERVISOR1,DESCRIPTION1,BUSPHONE1,COMPANY2,EMPFROMDATE2,EMPTODATE2,STARTWAGE2,ENDWAGE2,LEAVE2,SUPERVISOR2,DESCRIPTION2,BUSPHONE2,COMPANY3,EMPFROMDATE3,EMPTODATE3,STARTWAGE3,ENDWAGE3,LEAVE3,SUPERVISOR3,DESCRIPTION3,BUSPHONE3,COMPANY4,EMPFROMDATE4,EMPTODATE4,STARTWAGE4,ENDWAGE4,LEAVE4,SUPERVISOR4,DESCRIPTION4,BUSPHONE4,COMPANY5,EMPFROMDATE5,EMPTODATE5,STARTWAGE5,ENDWAGE5,LEAVE5,SUPERVISOR5,DESCRIPTION5,BUSPHONE5,HSADDRES,HSSUBJECTS,HSYEARS,HSGRAD,HSDIPLOMA,COLLEGEADDRES,COLLEGESUBJECTS,COLLEGEYEARS,COLLEGEGRAD,COLLEGEDIPLOMA,TECHADDRES,TECHSUBJECTS,TECHYEARS,TECHGRAD,TECHDIPLOMA,REF1,REFADDRESS1,REFPHONE1,REF2,REFADDRESS2,REFPHONE2,REF3,REFADDRESS3,REFPHONE3,Q1,Q2,Q3
FULLTIMEYes
HSADDRES[empty string]
HSDIPLOMA[empty string]
HSGRADNo
HSSUBJECTS[empty string]
HSYEARS[empty string]
LEAVE1dfsf
LEAVE2[empty string]
LEAVE3[empty string]
LEAVE4[empty string]
LEAVE5[empty string]
PREVIOUSYes
PREVIOUSDATE2001
Q1Yes
Q2Yes
Q3Yes
REF1[empty string]
REF2[empty string]
REF3[empty string]
REFADDRESS1[empty string]
REFADDRESS2[empty string]
REFADDRESS3[empty string]
REFPHONE1[empty string]
REFPHONE2[empty string]
REFPHONE3[empty string]
STARTWAGE115
STARTWAGE2[empty string]
STARTWAGE3[empty string]
STARTWAGE4[empty string]
STARTWAGE5[empty string]
SUPERVISOR1ef
SUPERVISOR2[empty string]
SUPERVISOR3[empty string]
SUPERVISOR4[empty string]
SUPERVISOR5[empty string]
TECHADDRES[empty string]
TECHDIPLOMA[empty string]
TECHGRADNo
TECHSUBJECTS[empty string]
TECHYEARS[empty string]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

I don't have time to go through everything.  Does it look, to you, as if everything is there?

Next, try my second suggestion regarding cftry/cfcatch (after you remove the code from my first suggestion) and run the page.  See if the cfcatch provides details that have thus far been lacking.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

So put <cftry><cfcatch><cfdump var="#cfcatch#"> at the beginning of my page and </cfcatch></cftry> at the very end?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

Close. 

<cftry>

your stuff

<cfcatch><cfdump var="#cfcatch#"></cfcatch>

<cftry>

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

I seem to be missign the emplyment history where all teh query params are

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

jobapp_process.cfm, line 123, appears to be the issue.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

so this line?

<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave5#"/>,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

If that line is line 123 of jobapp_process.cfm, yes.  I didn't see anything wrong in the form data from the CFDUMP.  Must be something else.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

I think it has to do with this set of line becuase of the error but i dont know what. Is there a better way to write this?

Error Executing Database Query.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'leave, supervisor, description) VALUES('MattMay-09-2013', 'sdads',' at line 1

<cfquery username='#username#' password='#password#'  datasource='#datasource#'>
INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)
VALUES('#jobappid#','#appdate#',

<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appphone#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstreet#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appcity#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstate#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appzip#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.fulltime#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.eighteen#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appposition#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previous#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previousdate#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.available#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.experiences#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.crime#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsaddres#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hssubjects#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsyears#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsgrad#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsdiploma#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeaddres#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegesubjects#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeyears#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegegrad#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegediploma#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techaddres#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techsubjects#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techyears#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techgrad#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techdiploma#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q1#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q2#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q3#"/>)


</CFQUERY>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

From a cursory glance, this portion of code is not an issue, other than jobappid and appdate not being in cfqueryparam tags.

The issue is specifically with the fifth iteration of company, the portion of the form for LEAVE.  According to the CFDUMP of the catch error message.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation