日期:2014-05-17 浏览次数:20525 次
<?php //Returns records with Id#46 or first name starting with 'Mary' $server = '127.0.0.1'; $link = mssql_connect($server, 'sql_user', 'sql_user_pass'); //Select DB $dbn = 'GFS'; mssql_select_db($dbn); //input variables $name='Mary%'; $id=46; //necesssary for stored procedure $params="@name varchar(50),@id int"; $paramslist="@name='$name%',@id='$id'"; $sql = "select * where user_table" ; //important to have the "N'" ! $result=mssql_query($dbsql,$link); ?>