mirror of
https://github.com/dg/dibi.git
synced 2025-08-09 15:47:23 +02:00
- improved binary escaping
This commit is contained in:
@@ -265,9 +265,11 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
switch ($type) {
|
||||
case dibi::FIELD_TEXT:
|
||||
case dibi::FIELD_BINARY:
|
||||
return "'" . mysqli_real_escape_string($this->connection, $value) . "'";
|
||||
|
||||
case dibi::FIELD_BINARY:
|
||||
return "_binary'" . mysqli_real_escape_string($this->connection, $value) . "'";
|
||||
|
||||
case dibi::IDENTIFIER:
|
||||
$value = str_replace('`', '``', $value);
|
||||
return '`' . str_replace('.', '`.`', $value) . '`';
|
||||
|
Reference in New Issue
Block a user