Php connection query display mssql data instance _ PHP Tutorial

Source: Internet
Author: User
Tags mssql server
The mssql data instance is displayed in the php connection query. The php connection query shows that the mssql data instance feels that the php and mysqlmssql database processing functions only have different prefixes. here we can see the instance. The connection query in the php Tutorial shows that the mssq php connection query shows the mssql data instance // it feels that the processing functions of php and mysql mssql databases only have different prefixes. here we will see the instance.

Php connection query shows mssql data instances
// I feel that the processing functions in the mssql database tutorial in php and mysql are different in Prefix. let's take a look at the instance below.

$ Link = mssql_connect ("localhost", "sa", "sa") or die ("cannot connect to mssql server ");
Mssql_select_db ("test", $ link) or die ("database connection failed ");



// Create an 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 ';
}



/*

Note:
Mssql_query
Mssql_num_rows
Mssql_fetch_object saves data to an object
Mssql_select_db select database
Mssql_connect database connection
This article was originally posted on www. bKjia. c0m and indicated the source

Http://www.bkjia.com/PHPjc/630877.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/630877.htmlTechArticlephp connection query show mssql data instance // feel php and mysql mssql database processing function on just a different prefix, the following Let's see the instance will know. The connection query of the php Tutorial shows mssq...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.