{"id":612,"date":"2012-07-20T09:54:02","date_gmt":"2012-07-20T09:54:02","guid":{"rendered":"http:\/\/codeatelier.wordpress.com\/?p=98"},"modified":"2012-07-20T09:54:02","modified_gmt":"2012-07-20T09:54:02","slug":"procedure-call-from-php","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/procedure-call-from-php\/","title":{"rendered":"Procedure Call from PHP"},"content":{"rendered":"<p><strong>Mysqli Method<\/strong><br \/>\n<strong>Procedure<\/strong><\/p>\n<pre>  DROP PROCEDURE IF EXISTS prSample1;\n  CREATE PROCEDURE prSample1(OUT Name VARCHAR(255))\n  BEGIN\n    SET Name = 'Mugil';\n    SELECT Name;\n  END;<\/pre>\n<p><strong>Call to Procedure From PHP<\/strong><\/p>\n<pre>  $Conn = new mysqli('localhost', 'root', '', 'metroplots');\t\t\t\t\n\n  $strSQL = \"CALL prSample1(@Name)\";\n  $stmt   = $Conn-&gt;prepare($strSQL);\n\n  $stmt-&gt;execute();\n  $stmt-&gt;bind_result($Name);\t\n\n  while($stmt-&gt;fetch())\n   $strName = $Name;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Mysqli Method Procedure DROP PROCEDURE IF EXISTS prSample1; CREATE PROCEDURE prSample1(OUT Name VARCHAR(255)) BEGIN SET Name = &#8216;Mugil&#8217;; SELECT Name; END; Call to Procedure From PHP $Conn = new mysqli(&#8216;localhost&#8217;, &#8216;root&#8217;, &#8221;, &#8216;metroplots&#8217;); $strSQL = &#8220;CALL prSample1(@Name)&#8221;; $stmt = $Conn-&gt;prepare($strSQL); $stmt-&gt;execute(); $stmt-&gt;bind_result($Name); while($stmt-&gt;fetch()) $strName = $Name;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92],"tags":[],"class_list":["post-612","post","type-post","status-publish","format-standard","hentry","category-procedures-php"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/612","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=612"}],"version-history":[{"count":0,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/612\/revisions"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}