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")
Mssql.class.rar ( 1.38 KB Download: 17 times )