Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7494135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:20:03+00:00 2026-05-29T17:20:03+00:00

Suppose I want to update two columns in one ON DUPLICATE STATEMENT: INSERT INTO

  • 0

Suppose I want to update two columns in one ON DUPLICATE STATEMENT:

 INSERT INTO `daily_lead_rollups` (`year`, `month`, `day`, `a_id`, `f_id`, `0_d`,`0_r`) VALUES (NEW.year,NEW.month,NEW.day,NEW.a_id,NEW.f_id, 1,NEW.payout) ON DUPLICATE KEY UPDATE    0_d  =  0_d + 1,   0_r  =0_r + NEW.payout; 

Error:

1235 – This version of MySQL doesn’t yet support ‘multiple triggers with the same action time and event for one table’

I know you can insert multiple rows, but I didn’t find anything about updating multiple columns with a calculation.

MySQL is fine with one calculation, even without

VALUES

, but has an issue with two!

I corrected the statement for future reference, the issue is resolved.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:20:17+00:00Added an answer on May 29, 2026 at 5:20 pm

    I’m not quite sure why you are trying to VALUES like that, but I suspect you mean this:

    ON DUPLICATE KEY UPDATE 
        0_d = 0_d + 1,
        0_r = 0_r + NEW.payout
    

    There are also some good examples of how to use ON DUPLICATE KEY UPDATE in the manual.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have one table with two TIMESTAMP columns. One column to keep
Suppose you want a Blog with two different layouts. One layout should look like
suppose you update your code to revision 10 which is broken. You want to
Suppose I want to put objects that identify a server into a stl set
I'm using EF4. I want to insert a new MyObject into the database. MyObject
I have two tables suppose table 1 has two columns with short names and
Suppose I want to create and update a model. What fields are displayed and
Suppose I have two entities: User and UserGroup . They have a one-to-many relationship
Suppose I want to open a file in an existing Emacs session using su
Suppose I want to implement a reasonably efficient 'keyword recognition algorithm', that is first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.