Copy code The code is as follows:
include("adodb/adodb.inc.php"); /Contains adodb class library file
$conn = NewADOConnection('postgres');
$conn->Connect('localhost', 'root', 'pass', 'mydb'); //Connect to PostgreSQL Database
?>
Copy code The code is as follows:
< ?php
include("adodb/adodb.inc.php"); //Include adodb class library file
$conn = NewADOConnection('mysql://root:1981427@localhost/test'); // Connect to MySQL database
?>
Copy code The code is as follows:
include("adodb/adodb.inc.php"); //Include adodb class library file
$conn = NewADOConnection('mysql');
$conn->Connect( 'localhost', 'root', '1981427', 'test'); //Connect to MySQL database
?>
Copy Code The code is as follows:
include("adodb/adodb.inc.php"); //Include adodb class library file
$ conn = NewADOConnection('mysql://root:1981427@localhost/test'); //Connect to the database
?>
Copy code The code is as follows:
include("adodb/adodb.inc.php"); //Include adodb class library file
$conn = NewADOConnection(' postgres ');
$conn->Connect('host=localhost port=5432 dbname=mydb'); //Connect to PostgreSQL database
?>
Copy code The code is as follows:
include("adodb/adodb.inc.php"); /Contains adodb class library file
$conn = NewADOConnection('postgres://root:pass@localhost/mydb'); //Connect to PostgreSQL database
?>
Copy code The code is as follows:
include("adodb/adodb.inc.php") ; //Contains adodb class library file
$conn = NewADOConnection('access'); //Connect to Access database
$conn->Connect("Driver={Microsoft Access Driver (*.mdb)}; Dbq=d:\mydb.mdb;Uid=Admin;Pwd=;");
?>
Copy codeThe code is as follows:
include("adodb/adodb.inc.php"); //Include adodb class library file
$conn=NewADOConnection ('odbc_mssql'); //Connect to SQL Server database
$conn->Connect("Driver={SQL Server};Server=localhost;Database=mydb;",'username','password');
?>
Copy code The code is as follows:
include("adodb/adodb.inc.php"); //Include adodb class library file
$conn=NewADOConnection('mssql'); //Connect to SQL Server database
$conn->Connect(" localhost', 'username', 'password', 'mydb');
?>
Copy code The code is as follows :
include("adodb/adodb.inc.php"); //Include adodb class library file
$conn=NewADOConnection('db2'); //Connect to DB2 database
$conn->Connect("driver={IBM db2 odbc DRIVER};database=mydb;hostname=localhost;port=50000;
protocol=TCPIP;uid=root; pwd= pass");
?>
http://www.bkjia.com/PHPjc/320053.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/320053.htmlTechArticleCopy the code as follows: ?php include("adodb/adodb.inc.php"); //Include adodb Class library file $conn = NewADOConnection('postgres'); $conn-Connect('localhost', 'root', 'pass', 'mydb');...