|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
对我一点用处没有啊,我知道该怎么学,但是我想如何才能更快的学,一周速成,啊不,24小时速成那种,皮皮你有没?存储进程 <?php
$hostname = "tszzp";
$dbuser = "sa";
$dbpasswd = "";
$id = mssql_connect($hostname,$dbuser,$dbpasswd) or die("没法毗连数据库办事器!");
//printf("%d<BR>\n", $id);
$db = mssql_select_db("stock",$id) or die("没法毗连stock数据库!");
$stockcode='600600';
$id = 0;
$msg = 0;
//printf("%d<BR>\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 stockcode='600028'";
//$query = "select 0 where 1=0 ";
$rresult = mssql_query($query) or die("没法履行SQL:$query");
$arr = mssql_fetch_array($rresult);
print $result;
print "<br>\n";
printf("%d, %d, %s<br>\n", $arr[result], $arr[id], $arr[msg]);
printf("%d, %s<br>\n", $id, $msg);
//$stock = mssql_fetch_array($result);
//$name = $stock[id];
//print $name;
//print "abc";
?> 当然你可以把你最基本的功能放出来的时候就放出来,比如放到论坛上,让大家都参与, |
|