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/09/14 03:23] – mnewnham | v5:database:mysql [2023/01/24 21:51] – [Connecting With SSL] mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== MySQL ===== | ====== MySQL ===== | ||
- | Read the [[userguide: | + | ~~NOTOC~~ |
- | ====== mysqli driver | + | ===== mysqli driver ===== |
- | < | + | < |
- | ** This is the preferred driver to connections to MySQL databases. ** | + | == Specification == |
- | |Driver Name|mysqli| | + | ^Driver Name|mysqli| |
- | |Status|Active| | + | ^Data Provider|[[v5: |
- | |Windows|Yes| | + | ^Status|Active((This driver is actively supported by ADOdb project members))| |
- | |Unix|Yes| | + | ^Windows|Yes| |
+ | ^Unix|Yes| | ||
+ | ^ADOdb V5|Yes| | ||
+ | ^ADOdb V6|Yes| | ||
+ | == Alternatives == | ||
+ | [[v5: | ||
+ | == See Also == | ||
+ | [[v5: | ||
</ | </ | ||
- | 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 is the preferred driver for connections to the following databases: |
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
- | ====== mysql driver ====== | + | This driver uses the PHP **mysqli** interface |
- | <WRAP left 300px box> | + | |
- | |Driver Name|mysql| | + | It replaces [[v5: |
- | |Status|Deprecated| | + | |
- | |Windows|Yes| | + | ------------------------------------------- |
- | |Unix|Yes| | + | |
- | </ | + | ===== Driver Specific Issues |
- | This driver uses the PHP original mysql driver | + | ==== renameColumnSql ==== |
- | -------------------------------------------- | + | The method [[v5: |
- | ====== | + | '' |
- | <WRAP left 300px box> | + | ==== Usage ==== |
- | |Driver Name|mysqlt| | + | <code php> |
- | |Status|Deprecated| | + | /* |
- | |Windows|Yes| | + | * We are going to rename a column from col9 to col6. |
- | |Unix|Yes| | + | */ |
- | </WRAP> | + | $flds = 'col6 C(50) NOTNULL DEFAULT " |
- | This driver uses the PHP original mysql driver and provided support to transactional tables such as InnoDB. It cannot be used with the PHP ' | + | |
- | -------------------------------- | + | # Then create a data dictionary object, using this connection |
- | ====== | + | $dict = NewDataDictionary($db); |
- | <WRAP left 300px box> | + | |
- | |Driver Name|mysqlpo| | + | $sql = $dict-> |
- | |Status|Obsolete| | + | </code> |
- | |Windows|Yes| | + | ==== Connecting With SSL ==== |
- | |Unix|Yes| | + | From ADOdb version 5.21, you can make an SSL connection to MySQL in the following way: |
- | </WRAP> | + | |
- | This driver duplicates the functionality of the mysqlt driver and is not maintained. It will be removed in ADOdb version 6.0 | + | <code php> |
+ | /* | ||
+ | * Enable | ||
+ | */ | ||
+ | $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->ssl_key | ||
+ | $db-> | ||
+ | $db-> | ||
+ | $db-> | ||
+ | $db-> | ||
+ | /* | ||
+ | * Open the connection | ||
+ | */ | ||
+ | $db-> | ||
+ | </ | ||
- | {{tag> | + | {{tag> |
+ | {{htmlmetatags> |
v5/database/mysql.txt · Last modified: 2024/04/30 13:07 by dregad