v5:database:mysql
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
database:mysql [2015/09/14 03:23] – mnewnham | v5:database:mysql [2020/01/13 13:31] – Move deprecated legacy drivers to separate page dregad | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== MySQL ===== | ====== MySQL ===== | ||
- | Read the [[userguide: | + | ~~NOTOC~~ |
- | ====== mysqli driver | + | ===== mysqli driver ===== |
- | < | + | < |
- | ** This is the preferred driver to connections to MySQL databases. ** | + | == Specification == |
- | |Driver Name|mysqli| | + | ^Driver Name|mysqli| |
- | |Status|Active| | + | ^Data Provider|mysql| |
- | |Windows|Yes| | + | ^Status|Active((This driver is actively supported by ADOdb project members))| |
- | |Unix|Yes| | + | ^Windows|Yes| |
+ | ^Unix|Yes| | ||
+ | ^ADOdb V5|Yes| | ||
+ | ^ADOdb V6|Yes| | ||
+ | == Alternatives == | ||
+ | [[v5: | ||
</ | </ | ||
- | This preferred driver uses the PHP mysqli interface and supports all MySQL table types, with full support for transactions and rollback when the MySQL table type supports it. | ||
- | ---------------------------------------------- | + | ** This is the preferred driver for connections to the following databases: |
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | This driver uses the PHP **mysqli** interface and supports all table types, with full support for transactions and rollback when the table type supports it. | ||
+ | |||
+ | It replaces [[v5: | ||
+ | |||
+ | ------------------------------------------- | ||
+ | |||
+ | ===== Driver Specific Issues ===== | ||
+ | ==== renameColumnSql ==== | ||
+ | The method [[v5: | ||
+ | '' | ||
+ | ==== Usage ==== | ||
+ | <code php> | ||
+ | /* | ||
+ | * We are going to rename a column from col9 to col6. | ||
+ | */ | ||
+ | $flds = 'col6 C(50) NOTNULL DEFAULT " | ||
+ | |||
+ | # Then create a data dictionary object, using this connection | ||
+ | $dict = NewDataDictionary($db); | ||
+ | |||
+ | $sql = $dict-> | ||
+ | </ | ||
+ | ==== Connecting With SSL ==== | ||
+ | From ADOdb version 5.21, you can make an SSL connection to MySQL in the following way: | ||
+ | |||
+ | <code php> | ||
+ | /* | ||
+ | * Enable ADOdb | ||
+ | */ | ||
+ | $db = newAdoConnection(' | ||
+ | /* | ||
+ | * Set the SSL parameters | ||
+ | */ | ||
+ | $db-> | ||
+ | $db-> | ||
+ | $db-> | ||
+ | $db-> | ||
+ | $db-> | ||
+ | |||
+ | /* | ||
+ | * Open the connection | ||
+ | */ | ||
+ | $db-> | ||
+ | </ | ||
- | ====== mysql driver ====== | ||
- | <WRAP left 300px box> | ||
- | |Driver Name|mysql| | ||
- | |Status|Deprecated| | ||
- | |Windows|Yes| | ||
- | |Unix|Yes| | ||
- | </ | ||
- | This driver uses the PHP original mysql driver and only provides support to non-transactional tables such as MyIsam. It cannot be used with the PHP ' | ||
- | -------------------------------------------- | ||
- | ====== mysqlt driver ====== | ||
- | <WRAP left 300px box> | ||
- | |Driver Name|mysqlt| | ||
- | |Status|Deprecated| | ||
- | |Windows|Yes| | ||
- | |Unix|Yes| | ||
- | </ | ||
- | This driver uses the PHP original mysql driver and provided support to transactional tables such as InnoDB. It cannot be used with the PHP ' | ||
- | -------------------------------- | ||
- | ====== mysqlpo driver ====== | ||
- | <WRAP left 300px box> | ||
- | |Driver Name|mysqlpo| | ||
- | |Status|Obsolete| | ||
- | |Windows|Yes| | ||
- | |Unix|Yes| | ||
- | </ | ||
- | This driver duplicates the functionality of the mysqlt driver and is not maintained. It will be removed in ADOdb version 6.0 | ||
- | {{tag> | + | {{tag> |
+ | {{htmlmetatags> |
v5/database/mysql.txt · Last modified: 2024/04/30 13:07 by dregad