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
- All
- Comments
- Work Log
- History
- Activity
- Transitions
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.