Files
development/4dev/documentation/DB_Query_Params.md
2023-10-11 18:36:06 +09:00

446 B

DB Query Params ? and : to $

dbReturn* dbExec

keep ->query ->params for reference

: named params

in order for each named found replace with order number:

:name, :foo, :bar, :name =>
$1,    $2,   $3,    $1
$query = str_replace(
    [':name', ':foo', ':bar'],
    ['$1', '$2', '$3'],
    $query
);

? Params

Foreach ? set $1 to $n and store that in new params array in QUERY for each ? replace with matching $n