v5:database:mysql
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| database:mysql [2015/11/28 00:16] – mnewnham | v5:database:mysql [2026/01/30 03:48] (current) – [Connecting With SSL] mnewnham | ||
|---|---|---|---|
| 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((ADOdb version 5, in ADOdb version 6 this driver will become a data provider))| | + | ^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 == | ||
| - | [[database: | + | [[v5:database: |
| + | |||
| + | == See Also == | ||
| + | [[v5: | ||
| </ | </ | ||
| - | ** This is the preferred driver | + | ** This is the preferred driver |
| - | This preferred | + | * [[http:// |
| - | ---------------------------------------------- | + | |
| - | ===== mysql driver ===== | + | |
| - | < | + | |
| - | == Specification == | + | 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. |
| - | ^Driver Name|mysql| | + | |
| - | ^Data Provider|mysql)| | + | It replaces [[v5: |
| - | ^Status|Obsolete((This driver will be removed in ADOdb version 6))| | + | |
| - | ^Windows|Yes| | + | < |
| - | ^Unix|Yes| | + | Starting with ADOdb 5.22, the mysqli driver requires the [[https:// |
| - | ^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 ' | + | |
| - | -------------------------------------------- | + | |
| - | ===== mysqlt driver ===== | + | ------------------------------------------- |
| - | <WRAP right box round 300px> | + | |
| - | == 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 provided support to transactional tables such as InnoDB. It cannot be used with the PHP ' | + | |
| - | -------------------------------- | + | |
| - | ===== mysqlpo driver ===== | + | |
| - | <WRAP right box round 300px> | + | |
| - | == Specification == | + | |
| - | ^Driver Name|mysqlpo| | + | |
| - | ^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 duplicates the functionality of the mysqlt driver and is not maintained. It will be removed in ADOdb version 6.0 | + | |
| - | ------------------------------------------ | + | |
| ===== Driver Specific Issues ===== | ===== Driver Specific Issues ===== | ||
| ==== renameColumnSql ==== | ==== renameColumnSql ==== | ||
| - | The method [[dictionary: | + | The method [[v5:dictionary:renamecolumnsql|renameColumnSql]] normally takes 3 parameters, '' |
| '' | '' | ||
| ==== Usage ==== | ==== Usage ==== | ||
| Line 72: | Line 52: | ||
| $sql = $dict-> | $sql = $dict-> | ||
| - | </ | + | </ |
| - | {{tag>[MySQL windows unix supported]}} | + | ==== Connecting With SSL ==== |
| + | From ADOdb version 5.23.10, you make an SSL connection to MySQL in the following way: | ||
| + | |||
| + | <code php> | ||
| + | /* | ||
| + | * Enable ADOdb | ||
| + | */ | ||
| + | $db = newAdoConnection(' | ||
| + | /* | ||
| + | * Set the SSL parameters | ||
| + | */ | ||
| + | $db-> | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ] | ||
| + | ); | ||
| + | |||
| + | /* | ||
| + | * Open the connection | ||
| + | */ | ||
| + | $db-> | ||
| + | </ | ||
| + | |||
| + | ==== Connecting To A Microsoft Azure MySQL Instance ==== | ||
| + | <code php> | ||
| + | /* | ||
| + | * Enable ADOdb | ||
| + | */ | ||
| + | $db = newAdoConnection(' | ||
| + | |||
| + | $database = ' | ||
| + | $host = ' | ||
| + | $user = ' | ||
| + | $password = ' | ||
| + | |||
| + | $db-> | ||
| + | ' | ||
| + | [ | ||
| + | ' | ||
| + | ] | ||
| + | ); | ||
| + | |||
| + | $db-> | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | /* | ||
| + | * Open the connection | ||
| + | */ | ||
| + | $db-> | ||
| + | </ | ||
| + | |||
| + | ==== Forcing emulated prepared statements ==== | ||
| + | |||
| + | ADOdb 5.22 introduced support for " | ||
| + | [[https:// | ||
| + | see [[https:// | ||
| + | Before that, parameterized queries were emulated, which was a potential security risk. | ||
| + | |||
| + | When using database engines pretending to be MySQL but not implementing prepared statements such as | ||
| + | [[https:// | ||
| + | [[https:// | ||
| + | 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 '' | ||
| + | |||
| + | <code php> | ||
| + | $db = newAdoConnection(' | ||
| + | $db-> | ||
| + | $db-> | ||
| + | $db-> | ||
| + | </ | ||
| + | |||
| + | {{tag> | ||
| + | {{htmlmetatags> | ||
v5/database/mysql.1448666177.txt.gz · Last modified: (external edit)
