Why do Mysql return error code 1241 on Update query?











up vote
0
down vote

favorite












I'm using Mysql Workbench 8.0.12, I have a table (tblproduction) with three columns:



idProduction INT PK AI
dateProduction DATETIME
statusProduction VARCHAR(15)


When I try to change the value of the column statusProduction for example, from 'queue' to 'done' as the query below (SELECT, INSERT AND DELETE querys are OK):



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction=1;


The system returns "Error Code: 1241. Operand should contain 1 column(s)."
I've done some research and found out that this error code is related to syntax errors, but I didn't find any problem on my query.



If I try to do something like this:



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction='a';


The system actually run the query although 0 rows were affected, but it gave me the same error message if I try this instead:



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction='1';


I really don't know what is wrong, and I know it's a silly question but if anyone could help me.










share|improve this question


















  • 2




    can you please provide the complete DDL for creating this table.
    – Used_By_Already
    Nov 19 at 3:09










  • The error message does not fit your query, but I would check if you have an update trigger on your table, it might contain incorrect code (that will only run when your where-condition leads to an actual update, so probably not for id='a').
    – Solarflare
    Nov 19 at 3:40












  • @Used_By_Already DDL statement as down below: CREATE TABLE IF NOT EXISTS milani.tblProduction ( idProduction INT NOT NULL AUTO_INCREMENT, dateProduction DATETIME NOT NULL, statusProduction VARCHAR(15) NOT NULL, PRIMARY KEY (idProduction))
    – Fabricio Montagnani
    Nov 19 at 23:56












  • These small comments are not the place to add code. We expect important information like that DDL to be added into the question (there is an edit link for that reason) and in the question it can be properly formatted.
    – Used_By_Already
    Nov 20 at 0:09










  • @Solarflare there is a UPDATE trigger indeed, that I've dropped for testing and got the same outcome... I dropped the entire database and created it again without creating the update trigger this time and the update statement did work this time, thank you! I'm going to work on the trigger now
    – Fabricio Montagnani
    Nov 20 at 0:23















up vote
0
down vote

favorite












I'm using Mysql Workbench 8.0.12, I have a table (tblproduction) with three columns:



idProduction INT PK AI
dateProduction DATETIME
statusProduction VARCHAR(15)


When I try to change the value of the column statusProduction for example, from 'queue' to 'done' as the query below (SELECT, INSERT AND DELETE querys are OK):



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction=1;


The system returns "Error Code: 1241. Operand should contain 1 column(s)."
I've done some research and found out that this error code is related to syntax errors, but I didn't find any problem on my query.



If I try to do something like this:



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction='a';


The system actually run the query although 0 rows were affected, but it gave me the same error message if I try this instead:



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction='1';


I really don't know what is wrong, and I know it's a silly question but if anyone could help me.










share|improve this question


















  • 2




    can you please provide the complete DDL for creating this table.
    – Used_By_Already
    Nov 19 at 3:09










  • The error message does not fit your query, but I would check if you have an update trigger on your table, it might contain incorrect code (that will only run when your where-condition leads to an actual update, so probably not for id='a').
    – Solarflare
    Nov 19 at 3:40












  • @Used_By_Already DDL statement as down below: CREATE TABLE IF NOT EXISTS milani.tblProduction ( idProduction INT NOT NULL AUTO_INCREMENT, dateProduction DATETIME NOT NULL, statusProduction VARCHAR(15) NOT NULL, PRIMARY KEY (idProduction))
    – Fabricio Montagnani
    Nov 19 at 23:56












  • These small comments are not the place to add code. We expect important information like that DDL to be added into the question (there is an edit link for that reason) and in the question it can be properly formatted.
    – Used_By_Already
    Nov 20 at 0:09










  • @Solarflare there is a UPDATE trigger indeed, that I've dropped for testing and got the same outcome... I dropped the entire database and created it again without creating the update trigger this time and the update statement did work this time, thank you! I'm going to work on the trigger now
    – Fabricio Montagnani
    Nov 20 at 0:23













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm using Mysql Workbench 8.0.12, I have a table (tblproduction) with three columns:



idProduction INT PK AI
dateProduction DATETIME
statusProduction VARCHAR(15)


When I try to change the value of the column statusProduction for example, from 'queue' to 'done' as the query below (SELECT, INSERT AND DELETE querys are OK):



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction=1;


The system returns "Error Code: 1241. Operand should contain 1 column(s)."
I've done some research and found out that this error code is related to syntax errors, but I didn't find any problem on my query.



If I try to do something like this:



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction='a';


The system actually run the query although 0 rows were affected, but it gave me the same error message if I try this instead:



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction='1';


I really don't know what is wrong, and I know it's a silly question but if anyone could help me.










share|improve this question













I'm using Mysql Workbench 8.0.12, I have a table (tblproduction) with three columns:



idProduction INT PK AI
dateProduction DATETIME
statusProduction VARCHAR(15)


When I try to change the value of the column statusProduction for example, from 'queue' to 'done' as the query below (SELECT, INSERT AND DELETE querys are OK):



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction=1;


The system returns "Error Code: 1241. Operand should contain 1 column(s)."
I've done some research and found out that this error code is related to syntax errors, but I didn't find any problem on my query.



If I try to do something like this:



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction='a';


The system actually run the query although 0 rows were affected, but it gave me the same error message if I try this instead:



UPDATE tblproduction 
SET statusProduction = 'done'
WHERE idProduction='1';


I really don't know what is wrong, and I know it's a silly question but if anyone could help me.







mysql






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 18 at 23:19









Fabricio Montagnani

12




12








  • 2




    can you please provide the complete DDL for creating this table.
    – Used_By_Already
    Nov 19 at 3:09










  • The error message does not fit your query, but I would check if you have an update trigger on your table, it might contain incorrect code (that will only run when your where-condition leads to an actual update, so probably not for id='a').
    – Solarflare
    Nov 19 at 3:40












  • @Used_By_Already DDL statement as down below: CREATE TABLE IF NOT EXISTS milani.tblProduction ( idProduction INT NOT NULL AUTO_INCREMENT, dateProduction DATETIME NOT NULL, statusProduction VARCHAR(15) NOT NULL, PRIMARY KEY (idProduction))
    – Fabricio Montagnani
    Nov 19 at 23:56












  • These small comments are not the place to add code. We expect important information like that DDL to be added into the question (there is an edit link for that reason) and in the question it can be properly formatted.
    – Used_By_Already
    Nov 20 at 0:09










  • @Solarflare there is a UPDATE trigger indeed, that I've dropped for testing and got the same outcome... I dropped the entire database and created it again without creating the update trigger this time and the update statement did work this time, thank you! I'm going to work on the trigger now
    – Fabricio Montagnani
    Nov 20 at 0:23














  • 2




    can you please provide the complete DDL for creating this table.
    – Used_By_Already
    Nov 19 at 3:09










  • The error message does not fit your query, but I would check if you have an update trigger on your table, it might contain incorrect code (that will only run when your where-condition leads to an actual update, so probably not for id='a').
    – Solarflare
    Nov 19 at 3:40












  • @Used_By_Already DDL statement as down below: CREATE TABLE IF NOT EXISTS milani.tblProduction ( idProduction INT NOT NULL AUTO_INCREMENT, dateProduction DATETIME NOT NULL, statusProduction VARCHAR(15) NOT NULL, PRIMARY KEY (idProduction))
    – Fabricio Montagnani
    Nov 19 at 23:56












  • These small comments are not the place to add code. We expect important information like that DDL to be added into the question (there is an edit link for that reason) and in the question it can be properly formatted.
    – Used_By_Already
    Nov 20 at 0:09










  • @Solarflare there is a UPDATE trigger indeed, that I've dropped for testing and got the same outcome... I dropped the entire database and created it again without creating the update trigger this time and the update statement did work this time, thank you! I'm going to work on the trigger now
    – Fabricio Montagnani
    Nov 20 at 0:23








2




2




can you please provide the complete DDL for creating this table.
– Used_By_Already
Nov 19 at 3:09




can you please provide the complete DDL for creating this table.
– Used_By_Already
Nov 19 at 3:09












The error message does not fit your query, but I would check if you have an update trigger on your table, it might contain incorrect code (that will only run when your where-condition leads to an actual update, so probably not for id='a').
– Solarflare
Nov 19 at 3:40






The error message does not fit your query, but I would check if you have an update trigger on your table, it might contain incorrect code (that will only run when your where-condition leads to an actual update, so probably not for id='a').
– Solarflare
Nov 19 at 3:40














@Used_By_Already DDL statement as down below: CREATE TABLE IF NOT EXISTS milani.tblProduction ( idProduction INT NOT NULL AUTO_INCREMENT, dateProduction DATETIME NOT NULL, statusProduction VARCHAR(15) NOT NULL, PRIMARY KEY (idProduction))
– Fabricio Montagnani
Nov 19 at 23:56






@Used_By_Already DDL statement as down below: CREATE TABLE IF NOT EXISTS milani.tblProduction ( idProduction INT NOT NULL AUTO_INCREMENT, dateProduction DATETIME NOT NULL, statusProduction VARCHAR(15) NOT NULL, PRIMARY KEY (idProduction))
– Fabricio Montagnani
Nov 19 at 23:56














These small comments are not the place to add code. We expect important information like that DDL to be added into the question (there is an edit link for that reason) and in the question it can be properly formatted.
– Used_By_Already
Nov 20 at 0:09




These small comments are not the place to add code. We expect important information like that DDL to be added into the question (there is an edit link for that reason) and in the question it can be properly formatted.
– Used_By_Already
Nov 20 at 0:09












@Solarflare there is a UPDATE trigger indeed, that I've dropped for testing and got the same outcome... I dropped the entire database and created it again without creating the update trigger this time and the update statement did work this time, thank you! I'm going to work on the trigger now
– Fabricio Montagnani
Nov 20 at 0:23




@Solarflare there is a UPDATE trigger indeed, that I've dropped for testing and got the same outcome... I dropped the entire database and created it again without creating the update trigger this time and the update statement did work this time, thank you! I'm going to work on the trigger now
– Fabricio Montagnani
Nov 20 at 0:23












3 Answers
3






active

oldest

votes

















up vote
0
down vote













 please try using this method :      
I have created a table and inserted the record like this :
select * from tblproduction;
+--------------+---------------------+------------------+
| idProduction | dateProduction | statusProduction |
+--------------+---------------------+------------------+
| 1 | 2018-11-19 08:22:11 | queue |
+--------------+---------------------+------------------+

use update query :
UPDATE `test`.`tblproduction` SET `statusProduction` = 'done' WHERE `tblproduction`.`idProduction` =1;

got result :
--------------+---------------------+------------------+
| idProduction | dateProduction | statusProduction |
+--------------+---------------------+------------------+
| 1 | 2018-11-19 08:22:11 | done |
+--------------+---------------------+------------------+





share|improve this answer




























    up vote
    0
    down vote













    I am unable to reproduce your problem, see https://rextester.com/OQI5184



    #MySQL 5.7.12
    #'\' is a delimiter

    DROP TABLE IF EXISTS tblProduction;

    CREATE TABLE IF NOT EXISTS tblProduction (
    idProduction INT NOT NULL AUTO_INCREMENT
    , dateProduction DATETIME NOT NULL
    , statusProduction VARCHAR(15) NOT NULL
    , PRIMARY KEY (idProduction)
    )
    ;


    INSERT INTO tblProduction(dateProduction,statusProduction) VALUES ('2018-11-20','start');

    SELECT * FROM tblProduction;

    UPDATE tblproduction
    SET statusProduction = 'done'
    WHERE idProduction=1;

    SELECT * FROM tblProduction;


    RESULTS:



    +---+--------------+---------------------+------------------+
    | | idProduction | dateProduction | statusProduction |
    +---+--------------+---------------------+------------------+
    | 1 | 1 | 20.11.2018 00:00:00 | start |
    +---+--------------+---------------------+------------------+

    +---+--------------+---------------------+------------------+
    | | idProduction | dateProduction | statusProduction |
    +---+--------------+---------------------+------------------+
    | 1 | 1 | 20.11.2018 00:00:00 | done |
    +---+--------------+---------------------+------------------+





    share|improve this answer




























      up vote
      0
      down vote













      So the problem wasn't neither the query nor the table, there was an update trigger on this table (witch I dropped for testing and didn't work), to sum up I had to drop the database and created it all once again without creating the trigger. This time the update query worked, I'm working on the trigger now to see if I can find what's wrong






      share|improve this answer





















        Your Answer






        StackExchange.ifUsing("editor", function () {
        StackExchange.using("externalEditor", function () {
        StackExchange.using("snippets", function () {
        StackExchange.snippets.init();
        });
        });
        }, "code-snippets");

        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "1"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53366418%2fwhy-do-mysql-return-error-code-1241-on-update-query%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        0
        down vote













         please try using this method :      
        I have created a table and inserted the record like this :
        select * from tblproduction;
        +--------------+---------------------+------------------+
        | idProduction | dateProduction | statusProduction |
        +--------------+---------------------+------------------+
        | 1 | 2018-11-19 08:22:11 | queue |
        +--------------+---------------------+------------------+

        use update query :
        UPDATE `test`.`tblproduction` SET `statusProduction` = 'done' WHERE `tblproduction`.`idProduction` =1;

        got result :
        --------------+---------------------+------------------+
        | idProduction | dateProduction | statusProduction |
        +--------------+---------------------+------------------+
        | 1 | 2018-11-19 08:22:11 | done |
        +--------------+---------------------+------------------+





        share|improve this answer

























          up vote
          0
          down vote













           please try using this method :      
          I have created a table and inserted the record like this :
          select * from tblproduction;
          +--------------+---------------------+------------------+
          | idProduction | dateProduction | statusProduction |
          +--------------+---------------------+------------------+
          | 1 | 2018-11-19 08:22:11 | queue |
          +--------------+---------------------+------------------+

          use update query :
          UPDATE `test`.`tblproduction` SET `statusProduction` = 'done' WHERE `tblproduction`.`idProduction` =1;

          got result :
          --------------+---------------------+------------------+
          | idProduction | dateProduction | statusProduction |
          +--------------+---------------------+------------------+
          | 1 | 2018-11-19 08:22:11 | done |
          +--------------+---------------------+------------------+





          share|improve this answer























            up vote
            0
            down vote










            up vote
            0
            down vote









             please try using this method :      
            I have created a table and inserted the record like this :
            select * from tblproduction;
            +--------------+---------------------+------------------+
            | idProduction | dateProduction | statusProduction |
            +--------------+---------------------+------------------+
            | 1 | 2018-11-19 08:22:11 | queue |
            +--------------+---------------------+------------------+

            use update query :
            UPDATE `test`.`tblproduction` SET `statusProduction` = 'done' WHERE `tblproduction`.`idProduction` =1;

            got result :
            --------------+---------------------+------------------+
            | idProduction | dateProduction | statusProduction |
            +--------------+---------------------+------------------+
            | 1 | 2018-11-19 08:22:11 | done |
            +--------------+---------------------+------------------+





            share|improve this answer












             please try using this method :      
            I have created a table and inserted the record like this :
            select * from tblproduction;
            +--------------+---------------------+------------------+
            | idProduction | dateProduction | statusProduction |
            +--------------+---------------------+------------------+
            | 1 | 2018-11-19 08:22:11 | queue |
            +--------------+---------------------+------------------+

            use update query :
            UPDATE `test`.`tblproduction` SET `statusProduction` = 'done' WHERE `tblproduction`.`idProduction` =1;

            got result :
            --------------+---------------------+------------------+
            | idProduction | dateProduction | statusProduction |
            +--------------+---------------------+------------------+
            | 1 | 2018-11-19 08:22:11 | done |
            +--------------+---------------------+------------------+






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 19 at 7:44









            Atul Akabari

            954




            954
























                up vote
                0
                down vote













                I am unable to reproduce your problem, see https://rextester.com/OQI5184



                #MySQL 5.7.12
                #'\' is a delimiter

                DROP TABLE IF EXISTS tblProduction;

                CREATE TABLE IF NOT EXISTS tblProduction (
                idProduction INT NOT NULL AUTO_INCREMENT
                , dateProduction DATETIME NOT NULL
                , statusProduction VARCHAR(15) NOT NULL
                , PRIMARY KEY (idProduction)
                )
                ;


                INSERT INTO tblProduction(dateProduction,statusProduction) VALUES ('2018-11-20','start');

                SELECT * FROM tblProduction;

                UPDATE tblproduction
                SET statusProduction = 'done'
                WHERE idProduction=1;

                SELECT * FROM tblProduction;


                RESULTS:



                +---+--------------+---------------------+------------------+
                | | idProduction | dateProduction | statusProduction |
                +---+--------------+---------------------+------------------+
                | 1 | 1 | 20.11.2018 00:00:00 | start |
                +---+--------------+---------------------+------------------+

                +---+--------------+---------------------+------------------+
                | | idProduction | dateProduction | statusProduction |
                +---+--------------+---------------------+------------------+
                | 1 | 1 | 20.11.2018 00:00:00 | done |
                +---+--------------+---------------------+------------------+





                share|improve this answer

























                  up vote
                  0
                  down vote













                  I am unable to reproduce your problem, see https://rextester.com/OQI5184



                  #MySQL 5.7.12
                  #'\' is a delimiter

                  DROP TABLE IF EXISTS tblProduction;

                  CREATE TABLE IF NOT EXISTS tblProduction (
                  idProduction INT NOT NULL AUTO_INCREMENT
                  , dateProduction DATETIME NOT NULL
                  , statusProduction VARCHAR(15) NOT NULL
                  , PRIMARY KEY (idProduction)
                  )
                  ;


                  INSERT INTO tblProduction(dateProduction,statusProduction) VALUES ('2018-11-20','start');

                  SELECT * FROM tblProduction;

                  UPDATE tblproduction
                  SET statusProduction = 'done'
                  WHERE idProduction=1;

                  SELECT * FROM tblProduction;


                  RESULTS:



                  +---+--------------+---------------------+------------------+
                  | | idProduction | dateProduction | statusProduction |
                  +---+--------------+---------------------+------------------+
                  | 1 | 1 | 20.11.2018 00:00:00 | start |
                  +---+--------------+---------------------+------------------+

                  +---+--------------+---------------------+------------------+
                  | | idProduction | dateProduction | statusProduction |
                  +---+--------------+---------------------+------------------+
                  | 1 | 1 | 20.11.2018 00:00:00 | done |
                  +---+--------------+---------------------+------------------+





                  share|improve this answer























                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    I am unable to reproduce your problem, see https://rextester.com/OQI5184



                    #MySQL 5.7.12
                    #'\' is a delimiter

                    DROP TABLE IF EXISTS tblProduction;

                    CREATE TABLE IF NOT EXISTS tblProduction (
                    idProduction INT NOT NULL AUTO_INCREMENT
                    , dateProduction DATETIME NOT NULL
                    , statusProduction VARCHAR(15) NOT NULL
                    , PRIMARY KEY (idProduction)
                    )
                    ;


                    INSERT INTO tblProduction(dateProduction,statusProduction) VALUES ('2018-11-20','start');

                    SELECT * FROM tblProduction;

                    UPDATE tblproduction
                    SET statusProduction = 'done'
                    WHERE idProduction=1;

                    SELECT * FROM tblProduction;


                    RESULTS:



                    +---+--------------+---------------------+------------------+
                    | | idProduction | dateProduction | statusProduction |
                    +---+--------------+---------------------+------------------+
                    | 1 | 1 | 20.11.2018 00:00:00 | start |
                    +---+--------------+---------------------+------------------+

                    +---+--------------+---------------------+------------------+
                    | | idProduction | dateProduction | statusProduction |
                    +---+--------------+---------------------+------------------+
                    | 1 | 1 | 20.11.2018 00:00:00 | done |
                    +---+--------------+---------------------+------------------+





                    share|improve this answer












                    I am unable to reproduce your problem, see https://rextester.com/OQI5184



                    #MySQL 5.7.12
                    #'\' is a delimiter

                    DROP TABLE IF EXISTS tblProduction;

                    CREATE TABLE IF NOT EXISTS tblProduction (
                    idProduction INT NOT NULL AUTO_INCREMENT
                    , dateProduction DATETIME NOT NULL
                    , statusProduction VARCHAR(15) NOT NULL
                    , PRIMARY KEY (idProduction)
                    )
                    ;


                    INSERT INTO tblProduction(dateProduction,statusProduction) VALUES ('2018-11-20','start');

                    SELECT * FROM tblProduction;

                    UPDATE tblproduction
                    SET statusProduction = 'done'
                    WHERE idProduction=1;

                    SELECT * FROM tblProduction;


                    RESULTS:



                    +---+--------------+---------------------+------------------+
                    | | idProduction | dateProduction | statusProduction |
                    +---+--------------+---------------------+------------------+
                    | 1 | 1 | 20.11.2018 00:00:00 | start |
                    +---+--------------+---------------------+------------------+

                    +---+--------------+---------------------+------------------+
                    | | idProduction | dateProduction | statusProduction |
                    +---+--------------+---------------------+------------------+
                    | 1 | 1 | 20.11.2018 00:00:00 | done |
                    +---+--------------+---------------------+------------------+






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 20 at 0:19









                    Used_By_Already

                    21.9k21838




                    21.9k21838






















                        up vote
                        0
                        down vote













                        So the problem wasn't neither the query nor the table, there was an update trigger on this table (witch I dropped for testing and didn't work), to sum up I had to drop the database and created it all once again without creating the trigger. This time the update query worked, I'm working on the trigger now to see if I can find what's wrong






                        share|improve this answer

























                          up vote
                          0
                          down vote













                          So the problem wasn't neither the query nor the table, there was an update trigger on this table (witch I dropped for testing and didn't work), to sum up I had to drop the database and created it all once again without creating the trigger. This time the update query worked, I'm working on the trigger now to see if I can find what's wrong






                          share|improve this answer























                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            So the problem wasn't neither the query nor the table, there was an update trigger on this table (witch I dropped for testing and didn't work), to sum up I had to drop the database and created it all once again without creating the trigger. This time the update query worked, I'm working on the trigger now to see if I can find what's wrong






                            share|improve this answer












                            So the problem wasn't neither the query nor the table, there was an update trigger on this table (witch I dropped for testing and didn't work), to sum up I had to drop the database and created it all once again without creating the trigger. This time the update query worked, I'm working on the trigger now to see if I can find what's wrong







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 20 at 0:38









                            Fabricio Montagnani

                            12




                            12






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53366418%2fwhy-do-mysql-return-error-code-1241-on-update-query%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Feedback on college project

                                Futebolista

                                Albești (Vaslui)