That was gonna be my second guess, honest :OD -----Original Message----- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: 30 May 2003 13:46 To: CF-Talk Subject: Re: Insert woes... SOLVED
Dammit... Option is a reseverd field name in mysql... Doh!! On 30/5/03 1:36 pm, "Ryan Mitchell" <[EMAIL PROTECTED]> wrote: > Fraid not, the values are getting passed properly , which is the weird > thing.. It **looks** totally right.. But its throwing an error. > Im using mysql btw... > > > On 30/5/03 1:38 pm, "Adrian Lynch" <[EMAIL PROTECTED]> wrote: > >> Just a guess as I use SPs instead, but would quotes around the query params >> help? >> >> Ade >> >> -----Original Message----- >> From: Ryan Mitchell [mailto:[EMAIL PROTECTED] >> Sent: 30 May 2003 13:32 >> To: CF-Talk >> Subject: Insert woes... >> >> >> Hello >> >> Im having issues with a simple insert statement... I just cant get it to >> work and I don�t know why!! >> >> <cfquery ...> >> INSERT INTO SavedItems (Item, Quantity, AccountID, Option) >> VALUES ( >> <cfqueryparam cfsqltype="cf_sql_varchar" >> value="#Session.Cart[i].Item#">, >> <cfqueryparam cfsqltype="cf_sql_varchar" >> value="#Session.Cart[i].Quantity#">, >> <cfqueryparam cfsqltype="cf_sql_varchar" value="#Session.AccountID#">, >> <cfqueryparam cfsqltype="cf_sql_varchar" >> value="#Session.Cart[i].Option#"> >> ) >> </cfquery> >> >> I get this error: >> Error Executing Database Query. >> >> Syntax error or access violation: You have an error in your SQL syntax >> >> Any obvious mistakes? >> >> (and yes I am locking my session vars) >> >> Ryan >> >> >> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

