Bug fix for DB\IO params detection

Param detection found too many params, for example '$1'.
Fixed the regex to only allow params that are no preceeded by '
And must start with space/tab, =, (
This commit is contained in:
Clemens Schwaighofer
2023-04-07 14:34:13 +09:00
parent b4b33d6873
commit c51ceb926e
2 changed files with 17 additions and 5 deletions

View File

@@ -212,11 +212,11 @@ $query = <<<EOM
INSERT INTO
test_foo
(
test
test, string_a
) VALUES (
$1
$1, '$2'
)
RETURNING test
RETURNING test, string_a
EOM;
$db->dbPrepare("ins_test_foo_eom", $query);
$status = $db->dbExecute("ins_test_foo_eom", ['EOM BAR TEST ' . time()]);