1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 21:58:10 +02:00

- BYTEA detection fixed

This commit is contained in:
David Grudl
2009-03-17 07:26:09 +00:00
parent 5946b7e1f6
commit aa05a85dfb
2 changed files with 2 additions and 9 deletions

View File

@@ -232,14 +232,7 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
return "'" . sqlite_escape_string($value) . "'";
/*case dibi::BINARY: // SQLite 3
static $hex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
$value = (string) $value;
$len = strlen($value);
$res = "X'";
for ($i = 0; $i < $len; $i++) {
$res .= $hex[ord($value[$i]) >> 4] . $hex[ord($value[$i]) & 15];
}
return $res . "'";*/
return "X'" . bin2hex((string) $value) . "'";*/
case dibi::IDENTIFIER:
return '[' . str_replace('.', '].[', strtr($value, '[]', ' ')) . ']';