Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 10.0.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      DELIMITER $$
      
      USE `dekanat`$$
      
      DROP PROCEDURE IF EXISTS `Dek_ADPredmets`$$
      
      CREATE  PROCEDURE `Dek_ADPredmets`(IN iGroupsID INT)
      BEGIN
      
      SET @qur=" SELECT * FROM tpredmets ? "; 
      
      IF iGroupsID>0 THEN 
      SET @a=CONCAT("WHERE groupid=", iGroupsID);
      ELSE SET @a=" WHERE groupid=1074";
      END IF; 
      
      
       
      PREPARE Ad FROM @qur;
      EXECUTE Ad USING @a;
      END$$
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Hi Aleksey,

            Could you please be a bit more verbose in regard to the nature of your complaint?

            If you are getting a syntax error, it's expected, please check the manual in regard to the syntax of prepared statements: http://dev.mysql.com/doc/refman/5.6/en/prepare.html
            "Parameter markers can be used only where data values should appear, not for SQL keywords, identifiers, and so forth."

            If you are experiencing some other issues, please provide more details.

            Show
            elenst Elena Stepanova added a comment - Hi Aleksey, Could you please be a bit more verbose in regard to the nature of your complaint? If you are getting a syntax error, it's expected, please check the manual in regard to the syntax of prepared statements: http://dev.mysql.com/doc/refman/5.6/en/prepare.html "Parameter markers can be used only where data values should appear, not for SQL keywords, identifiers, and so forth." If you are experiencing some other issues, please provide more details.
            Hide
            elenst Elena Stepanova added a comment -

            I presume the quote above answered the question, so I'm closing the issue for now. If you disagree, please feel free to comment.

            Show
            elenst Elena Stepanova added a comment - I presume the quote above answered the question, so I'm closing the issue for now. If you disagree, please feel free to comment.

              People

              • Assignee:
                elenst Elena Stepanova
                Reporter:
                polyatykin Polyatykin Aleksey
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: