初学PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:36:14871browse

PHP的基本语法边看资料边学 还是比较容易上手的

在这里只贴点 PHP操作MSSQL的代码

<?php//$conn=mssql_connect("localhost","sa",""); $conn=odbc_connect( "Driver={SQL Server};Server=数据库名或IP;Database=数据库名","数据库用户名","数据库密码");if($conn) echo " <br/> 连接成功 "; else echo  "连接失败 "; $sql = "select * from T_Admin where id=1"; $query = @odbc_do($conn,$sql); if(odbc_fetch_row($query)){//for($i=0;)echo  odbc_result($query,1)."<br/>"; echo  odbc_result($query,2)."<br/>"; echo  odbc_result($query,3)."<br/>"; echo  odbc_result($query,4)."<br/>"; echo  odbc_result($query,5)."<br/>"; } ?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:CodeIgniter php sqlNext article:php级联