v5:database:mysql
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v5:database:mysql [2020/01/13 12:31] – Add tier1 tag dregad | v5:database:mysql [2024/04/30 13:07] (current) – Forcing emulated prepared statements dregad | ||
---|---|---|---|
Line 2: | Line 2: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
===== mysqli driver ===== | ===== mysqli driver ===== | ||
+ | |||
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
+ | |||
== Specification == | == Specification == | ||
^Driver Name|mysqli| | ^Driver Name|mysqli| | ||
- | ^Data Provider|mysql| | + | ^Data Provider|[[v5: |
^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 11: | Line 13: | ||
^ADOdb V5|Yes| | ^ADOdb V5|Yes| | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
+ | |||
== Alternatives == | == Alternatives == | ||
[[v5: | [[v5: | ||
+ | |||
+ | == See Also == | ||
+ | [[v5: | ||
</ | </ | ||
Line 20: | Line 26: | ||
* [[http:// | * [[http:// | ||
- | This preferred | + | 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. |
- | This driver | + | It replaces |
- | ------------------------------------------- | + | |
- | ===== Migrating To The mysqli driver ===== | + | |
- | If you are still using the //**mysql**// or// | + | |
+ | <WRAP important> | ||
+ | Starting with ADOdb 5.22, the mysqli driver requires the [[https:// | ||
+ | </ | ||
- | $db = newAdoConnection(' | + | ------------------------------------------- |
- | to | + | |
- | $db = newAdoConnection(' | + | |
===== Driver Specific Issues ===== | ===== Driver Specific Issues ===== | ||
Line 56: | Line 60: | ||
* Enable ADOdb | * Enable ADOdb | ||
*/ | */ | ||
- | $db = newAdoConnection(' | + | $db = newAdoConnection(' |
/* | /* | ||
* Set the SSL parameters | * Set the SSL parameters | ||
Line 72: | Line 76: | ||
</ | </ | ||
+ | ==== Connecting To A Microsoft Azure MySQL Instance ==== | ||
+ | <code php> | ||
+ | /* | ||
+ | * Enable ADOdb | ||
+ | */ | ||
+ | $db = newAdoConnection(' | ||
- | ===== mysql driver ===== | + | $database |
- | <WRAP right box round 300px> | + | $host = 'my-corporation.mysql.database.azure.com'; |
- | == Specification == | + | $user = ' |
- | ^Driver Name|mysql| | + | $password = 'Qzrt6r55geRt!'; |
- | ^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 only provides support to non-transactional tables such as MyIsam. | + | |
- | + | ||
- | * It cannot be used with the PHP 'Improved' | + | |
- | * 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. | + | |
+ | $db-> | ||
- | ----------------------------------------------- | + | /* |
- | ===== mysqlt driver ===== | + | * Open the connection |
- | <WRAP right box round 300px> | + | */ |
- | == Specification == | + | $db->connect($host, $user, $password, $database); |
- | ^Driver Name|mysqlt| | + | </code> |
- | ^Data Provider|mysql)| | + | |
- | ^Status|Obsolete((This driver will be removed in ADOdb version 6))| | + | |
- | ^Windows|Yes| | + | |
- | ^Unix|Yes| | + | |
- | ^ADOdb V5|Yes| | + | |
- | ^ADOdb V6|No| | + | |
- | </WRAP> | + | |
- | This driver uses the PHP original mysql driver and provided support to transactional tables such as InnoDB. | + | |
- | * It cannot be used with the PHP ' | + | ==== Forcing emulated prepared statements ==== |
- | * 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 | + | |
- | -------------------------------- | + | ADOdb 5.22 introduced support for " |
- | ===== mysqlpo driver ===== | + | [[https:// |
- | <WRAP right box round 300px> | + | see [[https:// |
- | == Specification == | + | Before that, parameterized queries were emulated, which was a potential security risk. |
- | ^Driver Name|mysqlpo| | + | |
- | ^Data Provider|mysql)| | + | When using database engines pretending to be MySQL but not implementing prepared statements such as |
- | ^Status|Obsolete((This driver will be removed in ADOdb version 6))| | + | [[https:// |
- | ^Windows|Yes| | + | [[https:// |
- | ^Unix|Yes| | + | it is possible((starting with ADOdb 5.22.8)) to force usage of emulated queries (i.e. reverting to behavior of ADOdb 5.21 and older) by setting the '' |
- | ^ADOdb V5|Yes| | + | |
- | ^ADOdb V6|No| | + | <code php> |
- | </WRAP> | + | $db = newAdoConnection(' |
- | This driver duplicates the functionality of the mysqlt driver and is not maintained. It will be removed in ADOdb version 6.0 | + | $db-> |
- | ------------------------------------------ | + | $db-> |
+ | $db-> | ||
+ | </ | ||
{{tag> | {{tag> | ||
{{htmlmetatags> | {{htmlmetatags> | ||
+ |
v5/database/mysql.txt · Last modified: 2024/04/30 13:07 by dregad