>From: "Robert Orlini" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: Update price
>Date: Tue, 30 Mar 2004 10:23:36 -0500
>
>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'

It should be

<CFQUERY name="change" datasource="printprices">
UPDATE bookinfo
SET percentage = #form.percentage#,
discountedprice = #form.price#
</cfquery>

It's one SET keyword with the different columns to update separated by a
comma.

Regards,
Dave.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to