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/08/30 18:04] – mnewnham | v5:database:mysql [2018/08/01 10:09] – fix variable name ssl_cert in ssl example peterdd | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== MySQL ===== | ====== MySQL ===== | ||
- | Read the [[userguide: | + | ~~NOTOC~~ |
- | ====== mysqli driver | + | ===== mysqli driver ===== |
- | < | + | < |
- | |Driver Name|mysqli| | + | == Specification == |
- | |Status|Active| | + | ^Driver Name|mysqli| |
- | |Windows|Yes| | + | ^Data Provider|mysql| |
- | |Unix|Yes| | + | ^Status|Active((This driver is actively supported by ADOdb project members))| |
+ | ^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. | ||
- | ---------------------------------------------- | + | ** This is the preferred driver for connections to the following databases: |
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
- | ====== mysql driver ====== | + | 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. |
- | < | + | |
- | |Driver Name|mysql| | + | This driver replaces both **mysql** and **mysqlt** drivers. |
- | |Status|Deprecated| | + | ------------------------------------------- |
- | |Windows|Yes| | + | ===== Migrating To The mysqli driver |
- | |Unix|Yes| | + | If you are still using the //**mysql**// or// |
+ | |||
+ | |||
+ | |||
+ | $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 | ||
+ | < | ||
+ | == Specification == | ||
+ | ^Driver Name|mysql| | ||
+ | ^Data Provider|mysql)| | ||
+ | ^Status|Obsolete((This driver will be removed in ADOdb version 6))| | ||
+ | ^Windows|Yes| | ||
+ | ^Unix|Yes| | ||
+ | ^ADOdb V5|Yes| | ||
+ | ^ADOdb V6|No| | ||
</ | </ | ||
- | This driver uses the PHP original mysql driver and provides support to non-transactional tables. 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 | + | This driver uses the PHP original mysql driver and only provides support to non-transactional tables |
- | -------------------------------------------- | + | |
- | ====== mysqlt driver | + | * 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. |
- | |Driver Name|mysqlt| | + | * This driver is deprecated as of ADOdb version 5.20 and will be removed in ADOdb version 6.0. |
- | |Status|Deprecated| | + | |
- | |Windows|Yes| | + | |
- | |Unix|Yes| | + | ----------------------------------------------- |
+ | ===== mysqlt driver ===== | ||
+ | < | ||
+ | == Specification == | ||
+ | ^Driver Name|mysqlt| | ||
+ | ^Data Provider|mysql)| | ||
+ | ^Status|Obsolete((This driver will be removed in ADOdb version 6))| | ||
+ | ^Windows|Yes| | ||
+ | ^Unix|Yes| | ||
+ | ^ADOdb V5|Yes| | ||
+ | ^ADOdb V6|No| | ||
</ | </ | ||
- | This driver uses the PHP original mysql driver and provides | + | This driver uses the PHP original mysql driver and provided |
+ | |||
+ | * 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 ===== |
- | < | + | < |
- | |Driver Name|mysqlpo| | + | == Specification == |
- | |Status|Obsolete| | + | ^Driver Name|mysqlpo| |
- | |Windows|Yes| | + | ^Data Provider|mysql)| |
- | |Unix|Yes| | + | ^Status|Obsolete((This driver will be removed in ADOdb version 6))| |
+ | ^Windows|Yes| | ||
+ | ^Unix|Yes| | ||
+ | ^ADOdb V5|Yes| | ||
+ | ^ADOdb V6|No| | ||
</ | </ | ||
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 | ||
+ | ------------------------------------------ | ||
- | {{tag> | + | {{tag> |
+ | {{htmlmetatags> |
v5/database/mysql.txt · Last modified: 2024/04/30 13:07 by dregad