Doctrine 1
  1. Doctrine 1
  2. DC-840

MSSQL - strange behavior with multiple addWhere conditions and ">" [+patch]

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2, 1.2.3
    • Fix Version/s: None
    • 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

        Show
        Enrico Stahn added a comment - http://github.com/estahn/doctrine1/compare/master...DC-840
        Hide
        Enrico Stahn added a comment -

        see DC-841

        Show
        Enrico Stahn added a comment - see DC-841

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Enrico Stahn
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: