sqlsrv function problems

Source: Internet
Author: User
MS SQL sqlsrv PHP5.3.5

Environment: Apache 2.2.22, PHP 5.3.5, Database MSSQL2008
MSSQL This is PHP5.3 previous version of, how to change the following code to PHP5.3 version, that is, sqlsrv function, I have tried to correct part, but always error, all can only ask for help!!
 $PAGECNT) {$CurrentPage = $PageCnt;} Set Start Page $start= $CurrentPage -3;//set End page number $end= $CurrentPage +3;//prev $prvpage= $CurrentPage -1;//Next $nextpage=$ Currentpage+1;if ($Start <1) {$Start =1; $End = $Start +6;} if ($End > $PageCnt) {$Start = $PageCnt-6; $End = $PageCnt;} if ($sqlstr! = "") {$sqlstr = "select Top". $PageSize. "Mname,msex,mbirthday,mtel,maddress,tname from Myfriends,team where Myfriends.tid=team.tid and mid not in (select Top.) $CurrentPage-1) * $PageSize. "Mid from Myfriends) and". $sqlstr;} else{$sqlstr = "SELECT Top". $PageSize. "Mname,msex,mbirthday,mtel,maddress,tname from Myfriends,team where Myfriends.tid=team.tid and mid not in (select Top.) $CurrentPage-1) * $PageSize. "Mid from Myfriends)";} echo $sqlstr; $result =mssql_query ($SQLSTR);//return result set/*mssql_fetch_row//row data mssql_fetch_field//fetching column data */?><title></title>
 
  
 


Reply to discussion (solution)

In general, it is possible to change MSSQL to SQLSRC, but pay attention to the position and meaning of each parameter.
There are some functions sqlsrv_ not, such as mssql_fetch_row corresponding to the sqlsrv_fetch_row is not, with SQLSRV_FETCH_ARRAY/SQLSRV_FETCH_OBJEC instead.

Specific Reference manual Bar

In general, it is possible to change MSSQL to SQLSRC, but pay attention to the position and meaning of each parameter.
There are some functions sqlsrv_ not, such as mssql_fetch_row corresponding to the sqlsrv_fetch_row is not, with SQLSRV_FETCH_ARRAY/SQLSRV_FETCH_OBJEC instead.

Specific Reference manual Bar
Can you provide a reference to this manual? Download a lot of PHP manuals on the internet, do not have this function (sqlsrv)

http://www.php.net/manual/zh/book.sqlsrv.php

http://php.net/manual/zh/book.sqlsrv.php

  • 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.