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 [2023/01/24 21:51] – [Connecting With SSL] mnewnham | 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| | ||
Line 11: | Line 13: | ||
^ADOdb V5|Yes| | ^ADOdb V5|Yes| | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
+ | |||
== Alternatives == | == Alternatives == | ||
[[v5: | [[v5: | ||
+ | |||
== See Also == | == See Also == | ||
[[v5: | [[v5: | ||
Line 25: | Line 29: | ||
It replaces [[v5: | It replaces [[v5: | ||
+ | |||
+ | <WRAP important> | ||
+ | Starting with ADOdb 5.22, the mysqli driver requires the [[https:// | ||
+ | </ | ||
+ | |||
------------------------------------------- | ------------------------------------------- | ||
Line 51: | Line 60: | ||
* Enable ADOdb | * Enable ADOdb | ||
*/ | */ | ||
- | $db = newAdoConnection(' | + | $db = newAdoConnection(' |
/* | /* | ||
* Set the SSL parameters | * Set the SSL parameters | ||
Line 72: | Line 81: | ||
* Enable ADOdb | * Enable ADOdb | ||
*/ | */ | ||
- | $db = newAdoConnection(' | + | $db = newAdoConnection(' |
$database = ' | $database = ' | ||
Line 79: | Line 88: | ||
$password = ' | $password = ' | ||
- | $db-> | ||
- | $db-> | ||
$db-> | $db-> | ||
- | $db-> | + | |
- | $db-> | + | |
/* | /* | ||
* Open the connection | * Open the connection | ||
*/ | */ | ||
$db-> | $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.1674593468.txt.gz · Last modified: 2023/01/24 21:51 by mnewnham