mirror of
https://github.com/dg/dibi.git
synced 2025-10-21 01:36:26 +02:00
- improved binary escaping
This commit is contained in:
@@ -281,9 +281,11 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
switch ($type) {
|
||||
case dibi::FIELD_TEXT:
|
||||
case dibi::FIELD_BINARY:
|
||||
return "'" . mysql_real_escape_string($value, $this->connection) . "'";
|
||||
|
||||
case dibi::FIELD_BINARY:
|
||||
return "_binary'" . mysql_real_escape_string($value, $this->connection) . "'";
|
||||
|
||||
case dibi::IDENTIFIER:
|
||||
// @see http://dev.mysql.com/doc/refman/5.0/en/identifiers.html
|
||||
$value = str_replace('`', '``', $value);
|
||||
|
Reference in New Issue
Block a user