diff --git a/dibi/dibi.php b/dibi/dibi.php index 609fb650..44d45ccb 100644 --- a/dibi/dibi.php +++ b/dibi/dibi.php @@ -653,7 +653,7 @@ class dibi if ($expr === TRUE) { self::$substs = array(); } else { - unset(self::$substs[':'.$expr.':']); + unset(self::$substs[$expr]); } } diff --git a/examples/using-substitutions.php b/examples/using-substitutions.php index a87c94ae..96bc83e9 100644 --- a/examples/using-substitutions.php +++ b/examples/using-substitutions.php @@ -55,8 +55,8 @@ define('SUBST_ACCOUNT', 'eshop_'); define('SUBST_ACTIVE', 7); dibi::test(" - UPDATE [:account:user] - SET [name]='John Doe', [status]=:active: + UPDATE :account:user + SET name='John Doe', status=:active: WHERE id=", 7 ); -// -> UPDATE [the_accountuser] SET [name]='John Doe', [status]=7 WHERE id=7 +// -> UPDATE eshop_user SET name='John Doe', status=7 WHERE id= 7