|
PHP5中文手册
MaxDB PHP Extension简介The MaxDB PHP extension allows you to access the functionality provided by MaxDB 7.5.0 and above. More information about the MaxDB Database server can be found at » http://www.mysql.com/products/maxdb/. The MaxDB PHP extension is compatible to the MySQL mysqli extension. There are only minor differences in the behaviour of some functions due to the differences of the underlying database servers, MaxDB and MySQL. The main differences to mysqli are in the following functions:
Documentation for MaxDB can be found at » http://dev.mysql.com/doc/maxdb/. 需求In order to have these functions available, you must compile PHP with MaxDB support. Additionally, you must have the MaxDB SQLDBC runtime library available to access the MaxDB server. Documentation for MaxDB SQLDBC can be found at » http://dev.mysql.com/doc/maxdb/. Download the MaxDB SQLDBC package from » http://dev.mysql.com/downloads/maxdb/clients.html. 安装By using the --with-maxdb[=DIR] configuration option you enable PHP to access MaxDB databases. [DIR] points to the directory that contains the installed MaxDB SQLDBC package. Windows users will need to enable php_maxdb.dll inside of php.ini. 运行时配置这些函数的行为受 php.ini 的影响。
以下是配置选项的简要解释。
预定义类maxdbRepresents a connection between PHP and a MaxDB database. 构造函数
方法
属性
maxdb_stmtRepresents a prepared statement. 方法
属性
maxdb_resultRepresents the result set obtained from a query against the database. 方法
属性
资源类型This extension defines resources. 预定义常量以下常量由本扩展模块定义,因此只有在本扩展模块被编译到 PHP 中,或者在运行时被动态加载后才有效。 The following constants to use with maxdb_options() are defined. For further description of these constants see » http://dev.mysql.com/doc/maxdb/.
The function maxdb_fetch_array() uses a constant for the different types of result arrays. The following constants are defined:
范例All examples in the MaxDB PHP documentation use the HOTELDB demo database from MaxDB. More about this database can be found at » http://dev.mysql.com/doc/maxdb/en/98/11b83fa6b33c17e10000000a114084/frameset.htm. To use the examples in the MaxDB PHP documentation, you have to load the tutorial data into your database. Then you have to set maxdb.default_db in php.ini to the database that contains the tutorial data. This simple example shows how to connect, execute a query, print resulting rows and disconnect from a MaxDB database. Example#1 MaxDB extension overview example
<?php The following example shows how to bind variables to a SELECT INTO statement. Example#2 Example for use of SELECT INTO statements
<?php The following example shows how to use MaxDB database procedures. Example#3 Example fore using database procedures
<?php Table of Contents
|