Skip to content

Commit

Permalink
fix: add support for PostgreSQL in dynamic update
Browse files Browse the repository at this point in the history
  • Loading branch information
edmondas committed Dec 28, 2023
1 parent 0ae4a88 commit b101030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dynamic_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
*/
function safe($db, $db_type, mixed $value): string
{
if ($db_type == 'mysql' || $db_type == 'sqlite') {
if ($db_type == 'mysql' || $db_type == 'sqlite' || $db_type == 'pgsql') {
$value = $db->quote($value, 'text');
$value = substr($value, 1, -1); // remove quotes
} else {
Expand Down

0 comments on commit b101030

Please sign in to comment.