Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Trivial
-
Resolution: Unresolved
-
Affects Version/s: 1.2.2, 1.2.3
-
Fix Version/s: 1.2.4
-
Component/s: Connection
-
Labels:None
Description
In the first example below the second parameter wasn't replaced by the given value. I tracked it down and i suppose it's because of the ">" sign. It's the same for "<". Equal-Operator (=) works fine.
$q = Doctrine_Query::create()
->select('password, modified_at')
->from('Ticket_DCXXX_Model')
->andWhere('password = ?', 'abc')
->andWhere('modified_at > ?', '2010-01-01')
SELECT [t].[id] AS [t__id], [t].[password] AS [t__password], [t].[modified_at] AS [t__modified_at] FROM [ticket__d_c_x_x_x__model] [t] WHERE ([t].[password] = 'abc' AND [t].[modified_at] > ?)
$q = Doctrine_Query::create()
->select('password, modified_at')
->from('Ticket_DCXXX_Model')
->andWhere('modified_at > ?', '2010-01-01')
->andWhere('password = ?', 'abc')
SELECT [t].[id] AS [t__id], [t].[password] AS [t__password], [t].[modified_at] AS [t__modified_at] FROM [ticket__d_c_x_x_x__model] [t] WHERE ([t].[modified_at] > '2010-01-01' AND [t].[password] = 'abc')
Activity
Enrico Stahn
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Summary | MSSQL - strange behavior with multiple addWhere conditions and ">" | MSSQL - strange behavior with multiple addWhere conditions and ">" [+patch] |