Upstream patch: Enable ORM to use column name in where clause
This commit is contained in:
parent
27684fc865
commit
f272bc254d
@ -114,6 +114,11 @@ abstract class Kohana_Database_Query_Builder extends Database_Query {
|
||||
{
|
||||
$value = $db->quote($value);
|
||||
}
|
||||
elseif (is_string($value) AND preg_match('/^=/',$value))
|
||||
{
|
||||
// Value is a column
|
||||
$value = $db->quote_column(preg_replace('/^=/','',$value));
|
||||
}
|
||||
elseif ((is_string($value) AND array_key_exists($value, $this->_parameters)) === FALSE)
|
||||
{
|
||||
// Quote the value, it is not a parameter
|
||||
|
Reference in New Issue
Block a user