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/12/20 03:52] – mnewnham | v5:database:mysql [2023/01/24 21:56] – [Connecting To A Microsoft Azure MySQL Instance] mnewnham | ||
---|---|---|---|
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|[[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 12: | Line 12: | ||
^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 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 driver replaces both **mysql** | + | * [[http://mysql.com|MySQL]] |
+ | | ||
+ | | ||
- | This driver also supports connections to all databases derived from MySQL, such as [[http:// | + | This driver uses the PHP **mysqli** interface |
- | ---------------------------------------------- | + | |
- | ===== mysql driver ===== | + | |
- | <WRAP right box round 300px> | + | |
- | == 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 | + | |
- | ----------------------------------------------------- | + | |
- | If you are still using this driver (or the mysqlt driver derived from it) you should be planning on migrating to the mysqli driver. Support for both drivers is built into PHP up to version PHP 5.4. From an ADOdb standpoint, it is simply a case of switching from | + | |
+ | It replaces [[v5: | ||
+ | ------------------------------------------- | ||
- | $db = newAdoConnection(' | ||
- | to | ||
- | $db = newAdoConnection(' | ||
- | |||
- | ----------------------------------------------- | ||
- | ===== 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 83: | Line 43: | ||
$sql = $dict-> | $sql = $dict-> | ||
- | </ | + | </ |
- | {{tag> | + | ==== 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-> | ||
+ | </ | ||
+ | |||
+ | ==== Connecting To A Microsoft Azure MySQL Instance ==== | ||
+ | <code php> | ||
+ | /* | ||
+ | * Enable ADOdb | ||
+ | */ | ||
+ | $db = newAdoConnection(' | ||
+ | |||
+ | $database = ' | ||
+ | $host = ' | ||
+ | $user = ' | ||
+ | $password = ' | ||
+ | |||
+ | $db-> | ||
+ | |||
+ | /* | ||
+ | * Open the connection | ||
+ | */ | ||
+ | $db-> | ||
+ | </ | ||
+ | |||
+ | {{tag> | ||
+ | {{htmlmetatags> |
v5/database/mysql.txt · Last modified: 2024/04/30 13:07 by dregad