I believe they're right Adam...

INSERT INTO table (poemID, rating, username)
VALUES (#url.id#, #form.rating#, #session.username#)

OR

UPDATE table (poemID, rating, username)
VALUES (#url.id#, #form.rating#, #session.username#)
WHERE poemID = '#url.id#'


On Fri, Mar 12, 2010 at 12:14 PM, Maureen <[email protected]> wrote:

>
> There is no where clause on an insert.  If it exists, you need to update
> it.
>
> On Fri, Mar 12, 2010 at 8:38 AM, Adam Parker <[email protected]> wrote:
> >
> > The query from code:
> >
> > INSERT INTO table (poemID, rating, username)
> > VALUES (#url.id#, #form.rating#, '#session.username#')
> > WHERE poemID = #url.id#
> >
> >
> > Error details:
> >
> > Error Executing Database Query.
> > [Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the
> keyword 'WHERE'.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4982
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to