1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-11 08:34:59 +02:00

tests: fixes

This commit is contained in:
David Grudl
2015-11-04 15:17:10 +01:00
parent 120f0946e0
commit 8f8fd040ff
10 changed files with 58 additions and 78 deletions

View File

@@ -69,3 +69,13 @@ function reformat($s)
trigger_error("Unsupported driver $config[system]", E_USER_WARNING);
}
}
function num($n)
{
global $config;
if (substr(@$config['dsn'], 0, 5) === 'odbc:' || $config['driver'] === 'sqlite') {
$n = is_float($n) ? "$n.0" : (string) $n;
}
return $n;
}