SET percentage = <cfqueryparam cfsqltype="CF_SQL_NUMERIC"
value="#form.percentage#"> ,
discountprice = price
WHERE ...

Assuming your percentage is numeric. I see you have quotes around it, so
mayby it's a varchar (CF_SQL_VARCHAR)

Don't forget the WHERE clause or you will update all records in the
table

> -----Original Message-----
> From: Robert Orlini [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 30 maart 2004 17:24
> To: CF-Talk
> Subject: Update price
>
> I have a query in an action page where I set a column to 0
> (from a form) and update discountedprice to the same value as
> price. Here is the code:
>
> <CFQUERY name="change" datasource="printprices"> Update
> bookinfo SET percentage = '#form.percentage#'
> SET 'discountedprice' = 'price'
> </cfquery>
>
> I'm kinda a newy to all this so of course it doesn't work. I
> get an error with -- SET 'discountedprice' = 'price'
>
> Any ideas please? Thanks.
>
> Robert O.
> HWW
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to