v5:database:text
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v5:database:text [2019/12/31 05:46] – fix the execute() call in example as intended peterdd | v5:database:text [2020/01/13 13:17] (current) – fix invalid tag specification dregad | ||
---|---|---|---|
Line 66: | Line 66: | ||
--------------------- | --------------------- | ||
<code php> | <code php> | ||
- | $rs = $db-> | + | // 3rd parameter is evaled PHP code, not SQL, so watch the ' |
- | + | $rs = $db-> | |
- | /* | + | |
- | * the 3rd param is searched -- make sure that $COL1 is a legal column name | + | |
- | */ | + | |
</ | </ | ||
Line 89: | Line 86: | ||
1=> | 1=> | ||
2=> | 2=> | ||
- | 3=> | + | 3=> |
4=> | 4=> | ||
5=> | 5=> | ||
Line 103: | Line 100: | ||
$sql = ' | $sql = ' | ||
+ | // Does not work with PHP 5.3 or later, see workaround below | ||
$result = $db-> | $result = $db-> | ||
Line 109: | Line 107: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ===== Workaround ===== | ||
+ | |||
+ | For PHP 5.3 or later, the following workaround can be used (tested with ADOdb 5.20.15). | ||
+ | |||
+ | Replace the '' | ||
+ | |||
+ | <code php> | ||
+ | $db-> | ||
+ | $result = $db-> | ||
+ | $db-> | ||
+ | </ | ||
+ | |||
+ | {{tag> |
v5/database/text.1577767564.txt.gz · Last modified: 2019/12/31 05:46 by peterdd