I changed them all to varchar to make sure they inserted, its a integer field now that I got it working :)
Thanks... On 30/5/03 2:42 pm, "Greg Luce" <[EMAIL PROTECTED]> wrote: > But the queryparam for quantity may need to be NUMERIC or INTEGER right? > Your quantity isn't VARCHAR is it? > > -----Original Message----- > From: Adrian Lynch [mailto:[EMAIL PROTECTED] > Sent: Friday, May 30, 2003 7:54 AM > To: CF-Talk > Subject: RE: Insert woes... SOLVED > > > 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 Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4