Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

A few easy fixes I am sure

Guest
Jun 17, 2006 Jun 17, 2006
Hello,

For a pervious action the forum data is updated like so:

<CFINSERT DATASOURCE="#Database.DSN#" TABLENAME="Posts" FORMFIELDS="PostAuthor, PostHeader, PostMessage, TopPost">

I was wondering how to add the following to this not only do I want the following operation to be carried I want the "INSERT" to add a number to a field in another table "WHERE UsersID = #URL.ID#" On its own the query looks like this:

<cfquery name="points" datasource="ukgl.co.uk">
SELECT UserPercent
FROM users
WHERE UsersID = #URL.ID#
</cfquery>

I want that to be incorporated into the "INSERT" query above and also add "20" to the "UsersPercent" Field.

Many Thanks

Hugh
TOPICS
Server side applications
203
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 17, 2006 Jun 17, 2006
LATEST
I am not clear on what you want. A CFINSERT only accepts input from Form
values. Are you wanting to pick up the newly created ID and then apply the
second action using that ID.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"Hugh Neale" <webforumsuser@macromedia.com> wrote in message
news:e70m24$9oi$1@forums.macromedia.com...
> Hello,
>
> For a pervious action the forum data is updated like so:
>
> <CFINSERT DATASOURCE="#Database.DSN#" TABLENAME="Posts"
> FORMFIELDS="PostAuthor, PostHeader, PostMessage, TopPost">
>
> I was wondering how to add the following to this not only do I want the
> following operation to be carried I want the "INSERT" to add a number to a
> field in another table "WHERE UsersID = #URL.ID#" On its own the query
> looks
> like this:
>
> <cfquery name="points" datasource="ukgl.co.uk">
> SELECT UserPercent
> FROM users
> WHERE UsersID = #URL.ID#
> </cfquery>
>
> I want that to be incorporated into the "INSERT" query above and also add
> "20"
> to the "UsersPercent" Field.
>
> Many Thanks
>
> Hugh
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines