{"id":651,"date":"2012-09-27T09:42:04","date_gmt":"2012-09-27T09:42:04","guid":{"rendered":"http:\/\/codeatelier.wordpress.com\/?p=325"},"modified":"2016-09-10T14:14:18","modified_gmt":"2016-09-10T14:14:18","slug":"mysql-procedure-taking-parameter","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/mysql-procedure-taking-parameter\/","title":{"rendered":"Mysql Procedure Taking parameter"},"content":{"rendered":"<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nDROP PROCEDURE IF EXISTS proc_sample1;\r\nCREATE PROCEDURE proc_sample1(IN pFruitId VARCHAR(255))\r\nBEGIN\r\n SET @strSQL = 'SELECT fruit_name \r\n                  FROM fruits\r\n                 WHERE fruit_id = ?';\r\n                 \r\n  SET @pFruitId = pFruitId;               \r\n  \r\n  PREPARE stmt FROM @strSQL;\r\n  EXECUTE stmt USING @pFruitId;\r\n  DEALLOCATE PREPARE stmt;                      \r\nEND\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>DROP PROCEDURE IF EXISTS proc_sample1; CREATE PROCEDURE proc_sample1(IN pFruitId VARCHAR(255)) BEGIN SET @strSQL = &#8216;SELECT fruit_name FROM fruits WHERE fruit_id = ?&#8217;; SET @pFruitId = pFruitId; PREPARE stmt FROM @strSQL; EXECUTE stmt USING @pFruitId; DEALLOCATE PREPARE stmt; END<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[87],"tags":[],"class_list":["post-651","post","type-post","status-publish","format-standard","hentry","category-procedures"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=651"}],"version-history":[{"count":2,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/651\/revisions"}],"predecessor-version":[{"id":1574,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/651\/revisions\/1574"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}