PHP Connection query display MSSQL data instance//feel PHP and MySQL MSSQL database processing function is only a different prefix, see the example below to know.
PHP Tutorial Connection query display MSSQL data instance
Feel PHP and MySQL tutorial MSSQL database tutorial processing function is only a different prefix, see the example below to know.
$link = Mssql_connect ("localhost", "sa", "sa") or Die ("Cannot connect to MSSQL server");
mssql_select_db ("Test", $link) or Die ("database connection failed");
Create a MSSQL query statement
$ms _sql = "SELECT * from works where username = ' www.bKjia.c0m '";
$mss _rs = mssql_query ($ms _sql);
if (Mssql_num_rows ($mss _rs))
{
while ($mss _rs = Mssql_fetch_object ($mss _rs))
{
echo "Output value ...";
}
}
Else
{
Echo ' record does not exist ';
}
/*
Indicate:
Mssql_query executing a query
Mssql_num_rows statistics record number of records
Mssql_fetch_object saving data to an object
mssql_select_db Selecting a Database
Mssql_connect Database Connection
This article original in www.bKjia.c0m reprint annotated source
http://www.bkjia.com/PHPjc/630877.html www.bkjia.com true http://www.bkjia.com/PHPjc/630877.html techarticle PHP Connection Query display MSSQL data instance//feel PHP and MySQL MSSQL database processing function is only a different prefix, see the example below to know. PHP Tutorial Connection query display MSSQ ...