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/15 03:38] – [mysqli driver] mnewnham | v5:database:mysql [2025/06/01 13:21] (current) – Remove square brackets in tags 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 == | ||
| + | [[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(' | ||
| - | {{tag>[MySQL windows unix supported tier1]}} | + | $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> | ||
| {{htmlmetatags> | {{htmlmetatags> | ||
| + | |||
v5/database/mysql.1579055931.txt.gz · Last modified:  by mnewnham
                
                