OccasionalCoder
Technical User
Hi:
I used the following to do an update on my database:
<cfquery name="update_data" datasource="#db#" username="#un#" password="#pw#">
update fellows
set
first_name='#form.first_name#',
mi='#form.mi#',
last_name='#form.last_name#',
nee='#form.nee#',
photo='#form.photo#',
agency='#form.agency#',
abbr='#form.abbr#',
division='#form.division#',
unit='#form.unit#',
school='#form.school#',
program='#form.program#',
synopsis='#form.synopsis#',
website='#form.website#',
email='#form.email#',
<cfif form.start_year is 'no date' or form.start_year is ''>
start_year=null,
<cfelse>
start_year='#dateformat(form.start_year, "mm/yyyy")#',
</cfif>
<cfif form.end_year is 'no date' or form.end_year is ''>
end_year=null,
<cfelse>
end_year='#dateformat(form.end_year, "mm/yyyy")#',
</cfif>
<cfif form.twostart_year is 'no date' or form.twostart_year is ''>
twostart_year=null,
<cfelse>
twostart_year='#dateformat(form.twostart_year, "mm/yyyy")#',
</cfif>
<cfif form.twoend_year is 'no date' or form.twoend_year is ''>
twoend_year=null,
<cfelse>
twoend_year='#dateformat(form.twoend_year, "mm/yyyy")#',
</cfif>
note='#form.note#',
status='#form.status#'
where entry_id=#form.entry_id#
</cfquery>
It worked ok, then I added the "note='#form.note#',"
line (4 up from the bottom), now I get a UPDATE syntax error message.
I take out "note='#form.note#'," and it works ok again.
I can't see anything wrong with the "form.note" line and am totally puzzled.
Any help would be greatly appreciated.
Thanks
I used the following to do an update on my database:
<cfquery name="update_data" datasource="#db#" username="#un#" password="#pw#">
update fellows
set
first_name='#form.first_name#',
mi='#form.mi#',
last_name='#form.last_name#',
nee='#form.nee#',
photo='#form.photo#',
agency='#form.agency#',
abbr='#form.abbr#',
division='#form.division#',
unit='#form.unit#',
school='#form.school#',
program='#form.program#',
synopsis='#form.synopsis#',
website='#form.website#',
email='#form.email#',
<cfif form.start_year is 'no date' or form.start_year is ''>
start_year=null,
<cfelse>
start_year='#dateformat(form.start_year, "mm/yyyy")#',
</cfif>
<cfif form.end_year is 'no date' or form.end_year is ''>
end_year=null,
<cfelse>
end_year='#dateformat(form.end_year, "mm/yyyy")#',
</cfif>
<cfif form.twostart_year is 'no date' or form.twostart_year is ''>
twostart_year=null,
<cfelse>
twostart_year='#dateformat(form.twostart_year, "mm/yyyy")#',
</cfif>
<cfif form.twoend_year is 'no date' or form.twoend_year is ''>
twoend_year=null,
<cfelse>
twoend_year='#dateformat(form.twoend_year, "mm/yyyy")#',
</cfif>
note='#form.note#',
status='#form.status#'
where entry_id=#form.entry_id#
</cfquery>
It worked ok, then I added the "note='#form.note#',"
line (4 up from the bottom), now I get a UPDATE syntax error message.
I take out "note='#form.note#'," and it works ok again.
I can't see anything wrong with the "form.note" line and am totally puzzled.
Any help would be greatly appreciated.
Thanks