Update DB\IO debug output for parameter queries

if value null set "NULL" else convert to string

Update class basic test with various type tests
This commit is contained in:
Clemens Schwaighofer
2023-03-28 16:46:34 +09:00
parent 742cbc31df
commit 11a8c6440b
2 changed files with 59 additions and 17 deletions

View File

@@ -892,7 +892,9 @@ class IO
for ($i = 0, $iMax = count($keys); $i < $iMax; $i++) {
$keys[$i] = '$' . ($keys[$i] + 1);
// prefix data set with parameter pos
$data[$i] = $keys[$i] . ':' . $data[$i];
$data[$i] = $keys[$i] . ':' . ($data[$i] === null ?
'"NULL"' : (string)$data[$i]
);
}
// simply replace the $1, $2, ... with the actual data and return it
return str_replace(