PHP calls the SQL Server stored procedure

zhaozj2021-02-12  135

/ N", $ ID); $ db = mssql_select_db ("stock", $ ID) OR DIE ("Unable to connect to the stock database!"); $ stockcode = '600600'; $ ID = 0; $ msg = 0; // printf ("% d
/ n", $ db); // $ query = "exec sp_test @ code = '600028', @ id = 0, @ msg = ' 000000 '"; $ query =" Declare @Result int, @ID int, @msg varchar (20) / n "; $ query. =" Exec @ result = sp_test / n "; $ query. =" / "$ Stockcode / ", / n"; $ query. = "@ ID output, / n"; $ query. = "@ msg output; / n"; $ query. = "SELECT @Result result, @id ID, @MSG MSG "; / * $ query =" DECLARE @Result int, @ID int, @msg varchar (20) / n "; $ query. =" exec @ result = sp_test / n "; $ query. =" / "$ stockcode / ", / n"; $ query. = "@ ID output, / n"; $ query. = "@ msg output; / n"; $ query. = "SELECT @Result result, @id ID, @MSG MSG "; * /// $ query =" Update test set stockname = '2Test' Where stockcode = '600028' "; // $ query =" Insert Into test (stockcode, stockname, id) VALUES ('600028 ",' TEST ', 13) "; // $ query =" SELECT * from test where stoc Kcode = '600028' "; // $ query =" SELECT 0 where 1 = 0 "; $ rresult = mssql_query ($ query) or Die (" SQL: $ query "); $ arr = mssql_fetch_Array ($ RRESULT) PRINT $ Result; Print "
/ N"; Printf ("% D,% D,% s
/ N"

转载请注明原文地址:https://www.9cbs.com/read-7237.html

New Post(0)