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 [2023/01/24 21:56] – [Connecting To A Microsoft Azure MySQL Instance] mnewnham | ||
---|---|---|---|
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|[[v5: |
- | |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: | ||
+ | == See Also == | ||
+ | [[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 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 provides support to 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 | + | |
- | -------------------------------- | + | # 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_ca | ||
+ | |||
+ | /* | ||
+ | * Open the connection | ||
+ | */ | ||
+ | $db-> | ||
+ | </code> | ||
- | {{tag> | + | {{tag> |
+ | {{htmlmetatags> |
v5/database/mysql.txt · Last modified: 2024/04/30 13:07 by dregad