Home > php教程 > php手册 > thinkphp3.2.3 + PHP5.3 MSSQL2000 class + paging

thinkphp3.2.3 + PHP5.3 MSSQL2000 class + paging

WBOY
Release: 2016-10-09 08:32:21
Original
1236 people have browsed it

MSSQL2000
I am a newbie and just started learning TP,

Since I need to use mssql2000, I haven’t found a solution yet,

Combined with the previous php5.2 code, I made one myself,

Masters, don’t spray!

Use native statements
1 Configure MSSQL information
'DB2' => array (
'DB_HOST' => '127.0.0.1',
'DB_NAME' => 'test',
'DB_USER' => 'sa',
'DB_PWD' => '123456',
),

2. Introduce the class and put the attachment under the path /Project/ORG/Util/

import("@.ORG.Util.Mssql");
$mdb = new mssql(C('DB2'));

3 calls:
Pagination=$mdb->get_pages("field","table","condition", "URL address", "number of records")
Number of data items=$mdb->get_num_rows("SELECT statement")
Data set=$mdb->get_list("SELECT statement")
Single piece of data=$mdb->get_one("SELECT statement")

thinkphp3.2.3 + PHP5.3 MSSQL2000 class + paging Mssql.class.rar ( 1.38 KB Download: 17 times )

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template