{"id":26207,"date":"2021-04-19T23:10:06","date_gmt":"2021-04-20T03:10:06","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/php-sql-server-stored-procedure-root\/"},"modified":"2021-04-19T23:10:06","modified_gmt":"2021-04-20T03:10:06","slug":"php-sql-server-stored-procedure-root","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=26207","title":{"rendered":"PHP SQL Server Stored Procedure #Root"},"content":{"rendered":"<pre>\/* prepare the statement resource *\/\n$stmt=mssql_init(\"your_stored_procedure\", $conn);\n\n\/* now bind the parameters to it *\/\nmssql_bind($stmt, \"@id\", $id, SQLINT4, FALSE);\nmssql_bind($stmt, \"@name\", $name, SQLVARCHAR, FALSE);\nmssql_bind($stmt, \"@email\", $email, SQLVARCHAR, FALSE);\n\n\/* now execute the procedure *\/\n$result = mssql_execute($stmt);<\/pre>\n<p>Another Example<\/p>\n<pre>$conn = mssql_connect($db_host,$db_user,$db_password);if ($conn===false){\necho 'Cannot connect.';\nexit;\n}\n\nif (mssql_select_db(\"YourDatabase\",$conn) === false) {\necho 'no database';\nexit;\n}\n\n$proc = mssql_init('YourStoredProcedure',$conn);\nmssql_bind($proc,'@ParameterOne',$ParameterOne,SQLVARCHAR);\nmssql_bind($proc,'@ParameterTwo',$ParameterTwo,SQLVARCHAR);\nmssql_bind($proc,'@ParameterThree',$ParameterThree,SQLVARCHAR);\nif ($result = mssql_execute($proc)) {\nif ($row = mssql_fetch_row($result)){\n\/\/ process results\n}\n}<\/pre>\n<p> From: http:\/\/sitestree.com\/php-sql-server-stored-procedure-prepare-the-statement-resource-stmtmssql_inityour_stored_procedure-conn-now-bind-the-parameters-to-it-mssql_bindstmt-id-id-sqlint4-fa\/<br \/> Categories:Root<br \/>Tags:<br \/> Post Data:2019-09-21 08:44:53<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* prepare the statement resource *\/ $stmt=mssql_init(&#8220;your_stored_procedure&#8221;, $conn); \/* now bind the parameters to it *\/ mssql_bind($stmt, &#8220;@id&#8221;, $id, SQLINT4, FALSE); mssql_bind($stmt, &#8220;@name&#8221;, $name, SQLVARCHAR, FALSE); mssql_bind($stmt, &#8220;@email&#8221;, $email, SQLVARCHAR, FALSE); \/* now execute the procedure *\/ $result = mssql_execute($stmt); Another Example $conn = mssql_connect($db_host,$db_user,$db_password);if ($conn===false){ echo &#8216;Cannot connect.&#8217;; exit; } if (mssql_select_db(&#8220;YourDatabase&#8221;,$conn) === false) &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=26207\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-26207","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":16205,"url":"http:\/\/bangla.sitestree.com\/?p=16205","url_meta":{"origin":26207,"position":0},"title":"PHP SQL Server Stored Procedure","author":"Sayed","date":"September 21, 2019","format":false,"excerpt":"\/* prepare the statement resource *\/ $stmt=mssql_init(\"your_stored_procedure\", $conn); \/* now bind the parameters to it *\/ mssql_bind($stmt, \"@id\", $id, SQLINT4, FALSE); mssql_bind($stmt, \"@name\", $name, SQLVARCHAR, FALSE); mssql_bind($stmt, \"@email\", $email, SQLVARCHAR, FALSE); \/* now execute the procedure *\/ $result = mssql_execute($stmt); Another Example $conn = mssql_connect($db_host,$db_user,$db_password);if ($conn===false){ echo 'Cannot connect.'; exit;\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":70089,"url":"http:\/\/bangla.sitestree.com\/?p=70089","url_meta":{"origin":26207,"position":1},"title":"PHP SQL Server Stored Procedure #16","author":"Author-Check- Article-or-Video","date":"August 25, 2021","format":false,"excerpt":"\/* prepare the statement resource *\/$stmt=mssql_init(\"your_stored_procedure\", $conn);\/* now bind the parameters to it *\/mssql_bind($stmt, \"@id\", $id, SQLINT4, FALSE);mssql_bind($stmt, \"@name\", $name, SQLVARCHAR, FALSE);mssql_bind($stmt, \"@email\", $email, SQLVARCHAR, FALSE); \/* now execute the procedure *\/$result = mssql_execute($stmt); Another Example $conn = mssql_connect($db_host,$db_user,$db_password);if ($conn===false){ echo 'Cannot connect.'; exit;} if (mssql_select_db(\"YourDatabase\",$conn) === false) { echo\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6093,"url":"http:\/\/bangla.sitestree.com\/?p=6093","url_meta":{"origin":26207,"position":2},"title":"\u09aa\u09bf\u098f\u0987\u099a\u09aa\u09bf \u09aa\u09cd\u09b0\u09bf\u09aa\u09c7\u09df\u09be\u09b0\u09cd\u09a1 \u09b8\u09cd\u099f\u09cd\u09af\u09be\u099f\u09ae\u09c7\u09a8\u09cd\u099f (PHP Prepared Statements in Bangla)","author":"Author-Check- Article-or-Video","date":"February 20, 2015","format":false,"excerpt":"\u09a1\u09be\u099f\u09be\u09ac\u09c7\u099c \u09ae\u09cd\u09af\u09be\u09a8\u09c7\u099c\u09ae\u09cd\u09af\u09be\u09a8\u09cd\u099f \u09b8\u09bf\u09b8\u09cd\u099f\u09c7\u09ae\u09c7 \u098f\u0995\u099f\u09bf \u09aa\u09cd\u09b0\u09bf\u09aa\u09c7\u09df\u09be\u09b0\u09cd\u09a1 \u09b8\u09cd\u099f\u09c7\u099f\u09ae\u09c7\u09a8\u09cd\u099f \u09b9\u09b2\u09cb \u098f\u09ae\u09a8 \u098f\u0995\u099f\u09bf \u09ab\u09bf\u099a\u09be\u09b0 \u09af\u09be \u098f\u0995\u0987 \u09ac\u09be \u098f\u0995\u0987 \u09a7\u09b0\u09a3\u09c7\u09b0 \u09a1\u09be\u099f\u09be\u09ac\u09c7\u099c \u09b8\u09cd\u099f\u09c7\u099f\u09ae\u09c7\u09a8\u09cd\u099f (\u09af\u09c7\u09ae\u09a8 SQL) \u09ac\u09be\u09b0\u09ac\u09be\u09b0 \u09a6\u0995\u09cd\u09b7\u09a4\u09be\u09b0 \u09b8\u09be\u09a5\u09c7 \u0985\u09cd\u09af\u09be\u0995\u099c\u09bf\u0995\u09bf\u0989\u099f \u0995\u09b0\u09a4\u09c7 \u09ac\u09cd\u09af\u09ac\u09b9\u09c3\u09a4 \u09b9\u09df\u0964 \u09b8\u09be\u09b0\u09cd\u09ad\u09be\u09b0 \u09b8\u09be\u0987\u09a1 \u09b8\u09cd\u0995\u09cd\u09b0\u09bf\u09aa\u09cd\u099f\u09bf\u0982 \u09ad\u09be\u09b7\u09be \u09aa\u09bf\u098f\u0987\u099a\u09aa\u09bf\u09a4\u09c7 (PHP) \u09aa\u09cd\u09b0\u09bf\u09aa\u09c7\u09df\u09be\u09b0\u09cd\u09a1 \u09b8\u09cd\u099f\u09c7\u099f\u09ae\u09c7\u09a8\u09cd\u099f\u0997\u09c1\u09b2\u09cb \u098f\u09b8\u0995\u09bf\u0989\u098f\u09b2 \u0987\u099e\u09cd\u099c\u09c7\u0995\u09b6\u09a8\u09c7\u09b0 \u09ac\u09bf\u09b0\u09c1\u09a6\u09cd\u09a7\u09c7 \u0996\u09c1\u09ac\u0987 \u0995\u09be\u09b0\u09cd\u09af\u0995\u09b0 \u09ad\u09c2\u09ae\u09bf\u0995\u09be \u09b0\u09be\u0996\u09c7\u0964 \u098f\u09b8\u0995\u09bf\u0989\u098f\u09b2 \u0987\u099e\u09cd\u099c\u09c7\u0995\u09b6\u09a8 \u09b9\u09b2\u09cb \u098f\u0995 \u09a7\u09b0\u09a3\u09c7\u09b0 \u0987\u099e\u09cd\u099c\u09c7\u0995\u09b6\u09a8 \u0995\u09cb\u09a1 \u09af\u09be \u09a1\u09be\u099f\u09be-\u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae\u0997\u09c1\u09b2\u09cb\u09a4\u09c7\u2026","rel":"","context":"In &quot;\u09aa\u09bf \u098f\u0987\u099a \u09aa\u09bf \u099f\u09bf\u0989\u099f\u09cb\u09b0\u09bf\u09df\u09be\u09b2 \u0964 PHP tutorial&quot;","block_context":{"text":"\u09aa\u09bf \u098f\u0987\u099a \u09aa\u09bf \u099f\u09bf\u0989\u099f\u09cb\u09b0\u09bf\u09df\u09be\u09b2 \u0964 PHP tutorial","link":"http:\/\/bangla.sitestree.com\/?cat=172"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6099,"url":"http:\/\/bangla.sitestree.com\/?p=6099","url_meta":{"origin":26207,"position":3},"title":"\u09aa\u09bf\u098f\u0987\u099a\u09aa\u09bf &#8211; \u09ae\u09be\u0987\u098f\u09b8\u0995\u09bf\u0989\u098f\u09b2 \u09a1\u09be\u099f\u09be \u0986\u09aa\u09a1\u09c7\u099f \u0995\u09b0\u09be  (PHP Update Data in MySQL)","author":"Author-Check- Article-or-Video","date":"February 17, 2015","format":false,"excerpt":"\u09ae\u09be\u0987\u098f\u09b8\u0995\u09bf\u0989\u098f\u09b2-\u0986\u0987 \u098f\u09ac\u0982 \u09aa\u09bf\u09a1\u09bf\u0993 \u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0 \u0995\u09b0\u09c7 \u09ae\u09be\u0987\u098f\u09b8\u0995\u09bf\u0989\u098f\u09b2 \u099f\u09c7\u09ac\u09b2\u09c7 \u09a1\u09be\u099f\u09be \u0986\u09aa\u09a1\u09c7\u099f \u098f\u0995\u099f\u09bf \u099f\u09c7\u09ac\u09b2\u09c7\u09b0 \u09ac\u09bf\u09a6\u09cd\u09af\u09ae\u09be\u09a8 \u09b0\u09c7\u0995\u09b0\u09cd\u09a1\u0997\u09c1\u09b2\u09cb \u0986\u09aa\u09a1\u09c7\u099f \u0995\u09b0\u09a4\u09c7 UPDATE \u09b8\u09cd\u099f\u09c7\u099f\u09ae\u09cd\u09af\u09be\u09a8\u09cd\u099f \u09ac\u09cd\u09af\u09ac\u09b9\u09c3\u09a4 \u09b9\u09df\u0983 UPDATE table_name SET column1=value, column2=value2,... WHERE some_column=some_value \u00a0 \u00a0 \u09b2\u0995\u09cd\u09b7\u09cd\u09af\u09a3\u09c0\u09df\u0983 \u0986\u09aa\u09a1\u09c7\u099f \u09b8\u09bf\u09a8\u099f\u09cd\u09af\u09be\u0995\u09cd\u09b8-\u098f\u09b0 WHERE \u0995\u09cd\u09b2\u099c\u099f\u09bf\u0995\u09c7 \u09b2\u0995\u09cd\u09b7\u09cd\u09af \u0995\u09b0\u09c1\u09a8\u0983 \u0995\u09cb\u09a8\u09cd\u200c \u09b0\u09c7\u0995\u09b0\u09cd\u09a1 \u09ac\u09be \u09b0\u09c7\u0995\u09b0\u09cd\u09a1\u09b8\u09ae\u09c2\u09b9 \u0986\u09aa\u09a1\u09c7\u099f \u0995\u09b0\u09be \u09b9\u09ac\u09c7 \u09a4\u09be WHERE \u0995\u09cd\u09b2\u099c\u099f\u09bf \u09a0\u09bf\u0995 \u0995\u09b0\u09c7 \u09a6\u09c7\u09df\u0964 \u0986\u09aa\u09a8\u09bf \u09af\u09a6\u09bf\u2026","rel":"","context":"In &quot;\u09aa\u09bf \u098f\u0987\u099a \u09aa\u09bf \u099f\u09bf\u0989\u099f\u09cb\u09b0\u09bf\u09df\u09be\u09b2 \u0964 PHP tutorial&quot;","block_context":{"text":"\u09aa\u09bf \u098f\u0987\u099a \u09aa\u09bf \u099f\u09bf\u0989\u099f\u09cb\u09b0\u09bf\u09df\u09be\u09b2 \u0964 PHP tutorial","link":"http:\/\/bangla.sitestree.com\/?cat=172"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":69886,"url":"http:\/\/bangla.sitestree.com\/?p=69886","url_meta":{"origin":26207,"position":4},"title":"Random C# and MS SQl Server #19","author":"Author-Check- Article-or-Video","date":"August 21, 2021","format":false,"excerpt":"Foreign Key in Table Declaration CREATE TABLE ORDERS ( ID integer primary key, Order_Date datetime, Customer_ID integer references CUSTOMER(ID), Amount double); ALTER TABLE ORDERS ADD FOREIGN KEY (customer_id) REFERENCES CUSTOMER(ID); Stored Procedure Example CREATE PROCEDURE [dbo].[procedure_name] @param1 VARCHAR(100) ,@param2 VARCHAR(200) OUTPUT AS BEGIN DECLARE @param3 VARCHAR(100) SET @param3 = '\u2026","rel":"","context":"In &quot;C# - Misc&quot;","block_context":{"text":"C# - Misc","link":"http:\/\/bangla.sitestree.com\/?cat=1973"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":70287,"url":"http:\/\/bangla.sitestree.com\/?p=70287","url_meta":{"origin":26207,"position":5},"title":"Random C# and MS SQl Server #.Net Web Applications","author":"Author-Check- Article-or-Video","date":"August 31, 2021","format":false,"excerpt":"Brought from: http:\/\/salearningschool.com\/displayArticle.php?table=Articles&articleID=1321&title=Random%20C#%20and%20MS%20SQl%20Server Foreign Key in Table Declaration CREATE TABLE ORDERS ( ID integer primary key, Order_Date datetime, Customer_ID integer references CUSTOMER(ID), Amount double ); ALTER TABLE ORDERS ADD FOREIGN KEY (customer_id) REFERENCES CUSTOMER(ID); Stored Procedure Example CREATE PROCEDURE [dbo].[procedure_name] @param1 VARCHAR(100) ,@param2 VARCHAR(200) OUTPUT AS BEGIN DECLARE @param3 VARCHAR(100)\u2026","rel":"","context":"In &quot;C# - Misc&quot;","block_context":{"text":"C# - Misc","link":"http:\/\/bangla.sitestree.com\/?cat=1973"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/26207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26207"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/26207\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26207"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}