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 13:31] – Move deprecated legacy drivers to separate page 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 23: | Line 29: | ||
It replaces [[v5: | It replaces [[v5: | ||
+ | |||
+ | <WRAP important> | ||
+ | Starting with ADOdb 5.22, the mysqli driver requires the [[https:// | ||
+ | </ | ||
+ | |||
------------------------------------------- | ------------------------------------------- | ||
Line 49: | Line 60: | ||
* Enable ADOdb | * Enable ADOdb | ||
*/ | */ | ||
- | $db = newAdoConnection(' | + | $db = newAdoConnection(' |
/* | /* | ||
* Set the SSL parameters | * Set the SSL parameters | ||
Line 65: | Line 76: | ||
</ | </ | ||
+ | ==== Connecting To A Microsoft Azure MySQL Instance ==== | ||
+ | <code php> | ||
+ | /* | ||
+ | * Enable ADOdb | ||
+ | */ | ||
+ | $db = newAdoConnection(' | ||
+ | |||
+ | $database = ' | ||
+ | $host = ' | ||
+ | $user = ' | ||
+ | $password = ' | ||
+ | |||
+ | $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> | {{tag> | ||
{{htmlmetatags> | {{htmlmetatags> | ||
+ |
v5/database/mysql.1578918715.txt.gz · Last modified: 2020/01/13 13:31 by dregad