1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 14:16:39 +02:00

some stuff is deprecated and throws E_USER_WARNING: dibi::datetime(), dibi::date(), dibi::addSubst(), dibi::removeSubst(), dibi::setSubstFallback(), DibiResult::rowCount(), DibiResult::getColumnNames(), DibiVariable

This commit is contained in:
David Grudl
2011-01-25 17:47:31 +01:00
parent 08099816d5
commit 0dc9db1d77
4 changed files with 18 additions and 23 deletions

View File

@@ -17,7 +17,7 @@ dibi::connect(array(
// create new substitution :blog: ==> wp_
dibi::addSubst('blog', 'wp_');
dibi::getSubstitutes()->blog = 'wp_';
dibi::test("SELECT * FROM [:blog:items]");
// -> SELECT * FROM [wp_items]
@@ -27,7 +27,7 @@ dibi::test("SELECT * FROM [:blog:items]");
// create new substitution :: (empty) ==> my_
dibi::addSubst('', 'my_');
dibi::getSubstitutes()->{''} = 'my_';
dibi::test("UPDATE ::table SET [text]='Hello World'");
// -> UPDATE my_table SET [text]='Hello World'
@@ -48,7 +48,7 @@ function substFallBack($expr)
}
// define callback
dibi::setSubstFallBack('substFallBack');
dibi::getSubstitutes()->setCallback('substFallBack');
// define substitutes as constants
define('SUBST_ACCOUNT', 'eshop_');