Home >Backend Development >PHP Tutorial >php连接mssql数据库有关问题
php连接mssql数据库问题
我想搞个注册页面(数据库是mssql的,)
php如何存取数据进mssql?
没用过mssql不知道是否与mysql相同
数据库名:GFS
表: user_table
里面有
id
username
pw
就这几个,帮我搞下
------解决方案--------------------
<?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);?><div class="clear"> </div>