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/11/28 00:16] – mnewnham | v5:database:mysql [2020/01/13 12:31] – Add tier1 tag dregad | ||
---|---|---|---|
Line 5: | Line 5: | ||
== Specification == | == Specification == | ||
^Driver Name|mysqli| | ^Driver Name|mysqli| | ||
- | ^Data Provider|mysql((ADOdb version 5, in ADOdb version 6 this driver will become a data provider))| | + | ^Data Provider|mysql| |
^Status|Active((This driver is actively supported by ADOdb project members))| | ^Status|Active((This driver is actively supported by ADOdb project members))| | ||
^Windows|Yes| | ^Windows|Yes| | ||
Line 12: | Line 12: | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
== Alternatives == | == Alternatives == | ||
- | [[database: | + | [[v5:database: |
</ | </ | ||
- | ** This is the preferred driver | + | ** This is the preferred driver |
- | 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. | + | * [[http:// |
- | ---------------------------------------------- | + | |
+ | | ||
+ | |||
+ | This preferred driver uses the PHP **mysqli** interface and supports all table types, with full support for transactions and rollback when the table type supports it. | ||
+ | |||
+ | This driver replaces both **mysql** and **mysqlt** drivers. | ||
+ | ------------------------------------------- | ||
+ | ===== Migrating To The mysqli driver ===== | ||
+ | If you are still using the // | ||
+ | |||
+ | |||
+ | |||
+ | $db = newAdoConnection(' | ||
+ | to | ||
+ | $db = newAdoConnection(' | ||
+ | |||
+ | ===== 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 ===== | ===== mysql driver ===== | ||
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
Line 29: | Line 84: | ||
^ADOdb V6|No| | ^ADOdb V6|No| | ||
</ | </ | ||
- | 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 ' | + | 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 ' | ||
+ | * The PHP driver is deprecated as of PHP Version 5.5 and will be removed in PHP version 7. | ||
+ | * This driver is deprecated as of ADOdb version 5.20 and will be removed in ADOdb version 6.0. | ||
+ | |||
+ | |||
+ | ----------------------------------------------- | ||
===== mysqlt driver ===== | ===== mysqlt driver ===== | ||
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
Line 42: | Line 103: | ||
^ADOdb V6|No| | ^ADOdb V6|No| | ||
</ | </ | ||
- | This driver uses the PHP original mysql driver and provided support to transactional tables such as InnoDB. It cannot be used with the PHP ' | + | This driver uses the PHP original mysql driver and provided support to transactional tables such as InnoDB. |
+ | |||
+ | * It cannot be used with the PHP ' | ||
+ | * The PHP driver is deprecated as of PHP Version 5.5 and will be removed in PHP version 7. | ||
+ | * This driver is deprecated as of ADOdb version 5.20 and will be removed in ADOdb version 6.0 | ||
-------------------------------- | -------------------------------- | ||
===== mysqlpo driver ===== | ===== mysqlpo driver ===== | ||
Line 57: | Line 123: | ||
This driver duplicates the functionality of the mysqlt driver and is not maintained. It will be removed in ADOdb version 6.0 | This driver duplicates the functionality of the mysqlt driver and is not maintained. It will be removed in ADOdb version 6.0 | ||
------------------------------------------ | ------------------------------------------ | ||
- | ===== Driver Specific Issues ===== | ||
- | ==== renameColumnSql ==== | ||
- | The method [[dictionary: | ||
- | '' | ||
- | ==== 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 | + | {{tag> |
- | $dict = NewDataDictionary($db); | + | {{htmlmetatags> |
- | + | ||
- | $sql = $dict-> | + | |
- | </ | + | |
- | {{tag> | + |
v5/database/mysql.txt · Last modified: 2024/04/30 13:07 by dregad