Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 13th, 2005, 01:08 PM
diez diez is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 2 diez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 59 sec
Reputation Power: 0
Need help with updating

Hello everyone,
I'm at ends with this script, I have several other update pages with the same scripts that work fine, when I try to execute this script it gives me a error (Syntax error in update statement). Maybe I need someone elses eye's to figure out what i'm missing. I would appriciate any help someone could give me.

Here is the code.

The form page.

<cfquery name="getevents" datasource="events">
SELECT * FROM events ORDER BY eventID ASC
</cfquery>
<html>
<head>
<title>Update Schools</title>
</head>

<body>
<cfoutput query="getevents">
<table>
<form action="ev_update.cfm" method="POST">
<INPUT TYPE="hidden" NAME="eventID" VALUE="#eventID#">

<tr>
<td>Date </td>
<td><input name="date" type="text" id="date" value="#date#" size="50"></td>
</tr>
<tr>
<td>Time</td>
<td><input name="time" type="text" id="time" value="#time#" size="50"></td>
</tr>
<tr>
<td>Month</td>
<td><input name="month" type="text" id="month" value="#month#" size="50"></td>
</tr>
<tr>
<td>Event Title</td>
<td><input name="ev_title" type="text" id="ev_title" value="#ev_title#" size="50"></td>
</tr>
<tr>
<td>Event Description </td>
<td><textarea name="ev_description" cols="50" id="ev_description">#ev_description#</textarea></td>
</tr>
<tr>
<td>Location </td>
<td><input name="ev_location" type="text" id="ev_location" value="#ev_location#" size="50"></td>
</tr>
<tr>
<td>CEU's availible </td>
<td><input name="ev_ceu" type="text" id="ev_ceu" value="#ev_ceu#" size="50"></td>
</tr>
<tr>
<td>Contact Info </td>
<td><input name="ev_contact" type="text" id="ev_contact" value="#ev_contact#" size="50"></td>
</tr>
<tr>
<td>Cost </td>
<td><input name="ev_cost" type="text" id="ev_cost" value="#ev_cost#" size="50"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="Submit" value="Update Information"></td>
</tr>
</form>
</table>
</cfoutput>
</body>
</html>


The update page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Update Event</title>
<style type="text/css">
<!--
.style1 {color: #0000FF}
.style2 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
</head>

<body>
<cfquery name="getevents" datasource="events">
Update events
Set date = '#Form.date#',
time = '#Form.time#',
month = '#Form.month#',
ev_title = '#Form.ev_title#',
ev_description = '#Form.ev_description#',
ev_location = '#Form.ev_location#',
ev_ceu = '#Form.ev_ceu#',
ev_contact = '#Form.ev_contact#',
ev_cost = '#Form.ev_cost#'
WHERE eventID = #Form.eventID#</cfquery>

<cfoutput>
<p>You have updated the information for <br>
<span class="style2">-#Form.ev_title#</span>
<span class="style1"><br>
<strong>-#Form.ev_description#</strong></span><br>
in the Event database.

</p></cfoutput>
</body>
</html>



The error
Error Executing Database Query.
Syntax error in UPDATE statement.

The error occurred in ....\ev_update.cfm: line 29

27 : ev_contact = '#Form.ev_contact#',
28 : ev_cost = '#Form.ev_cost#'
29 : WHERE eventID = #Form.eventID#</cfquery>
30 :

Thanks for your help.

Reply With Quote
  #2  
Old July 14th, 2005, 01:38 AM
diez diez is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 2 diez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 59 sec
Reputation Power: 0
Nevermind,
I figured it out.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > Need help with updating


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap