Percy,

DESC is a reserve word.  Rename your column or use a quoted identifyer
([desc])

-mk

-----Original Message-----
From: Perez, Percy [mailto:PercyP@;versa-valves.com]
Sent: Tuesday, November 12, 2002 8:26 AM
To: CF-Talk
Subject: inserting a record in Linux/MySQL


Hello everyone,
I am trying to issue a simple insert statement and it is giving me an error.

The SQL statement is:

<cfquery name="q_savebk" datasource="home">
insert into web.bookmark(ulocation, desc)
values ('#URLEncodedFormat(form.f_ulocation)#','#form.f_desc#')
</cfquery>

Value of form.f_ulocation is : http://www.macromedia.com
Value of form.f_desc is : Macromedia website

The platform is: Linux Redhat 7.3/MX Pro/MySQL

Below is the error message from the Server (BTW, I tried the above in my NT
server and it works.).
Thank you in advance,

Percy

---

Error Executing Database Query.
Syntax error or access violation: You have an error in your SQL syntax near
'desc) values ('http%3A%2F%2Fwww%2Emacromedia%2Ecom%2F','Macromedia
Website')' at line 1

The error occurred in /home/www/developer/bookmarks/test_save.cfm: line 14

12 : values
13 : ('#URLEncodedFormat(form.f_ulocation)#','#form.f_desc#')
14 : </cfquery>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to