PHP joins MSSQL database

Source: Internet
Author: User
PHP Connection MSSQL Database
The original program is connected to MySQL
Now I want to be MSSQL.
Because there is no way to connect with PDO ADO, etc.
So you have to modify the program yourself.
PHP config file has been opened MSSQL program error:
Fatal error:call to undefined function mssql_insert_id ()
Fatal error:call to undefined function mssql_affected_rows ()
Does MSSQL not have these two functions?
------Optimal Solution--------------------
http://php.net/manual/en/book.mssql.php
Sure enough, no.
However, this page gives an alternative:
 
  







?>

And
http://www.php.net/manual/en/function.mssql-rows-affected.php
------Other Solutions--------------------
Phpinfo look at the module plus no
------Other Solutions--------------------
If it's PHP 5.3 or more, there's no
------Other Solutions--------------------
Reference:
phpinfo look at the module plus no


Mssql
MSSQL Support Enabled
Active Persistent Links 0
Active Links 0
Library version 7.0

Directive Local Value Master value
Mssql.allow_persistent on
Mssql.batchsize 0 0
Mssql.compatability_mode off off
Mssql.connect_timeout 5 5
Mssql.datetimeconvert on
Mssql.max_links Unlimited Unlimited
Mssql.max_persistent Unlimited Unlimited
Mssql.max_procs Unlimited Unlimited
Mssql.min_error_severity 10 10
Mssql.min_message_severity 10 10
Mssql.secure_connection off off
Mssql.textlimit Server default Server default
Mssql.textsize Server default Server default
Mssql.timeout 60 60
------Other Solutions--------------------
Reference:
if it is PHP 5.3 or more there is no

PHP 5.26
------Other Solutions--------------------
It seems like we're going to put the DLL file under System32.
------Other Solutions--------------------
Reference: It
seems like to put the relevant DLL files under the system32.

Should not be the problem MSSQL can be used already connected to the MSSQL
The two functions are not used.
------Other Solutions--------------------
On the window platform, open the MSSQL-related DLL directly in php.ini
On a Linux platform, a third-party, like ODBC under window, is required,
Call FreeTDS like ...
------Other Solutions--------------------
Reference:
http://php.net/manual/en/book.mssql.php
Sure enough, no.
However, this page gives an alternative:
PHP code12345678910
  • 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.