Doctrine 1
  1. Doctrine 1
  2. DC-665

Named parameters doesn't work on MSSQL anymore

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: Query
    • Labels:
      None
    • Environment:
      Windows Server 2003. PHP 5.2.12. MS SQL Server 2008

      Description

      After upgrading to Doctrine 1.2.2 queries with named arguments doesn't work anymore.
      Whenever querying like
      $query = Doctrine_Query::create();
      $customer = $query->from('Customers')
      ->where("id = :id"
      , array('id'=>$user['customer_id']))
      ->fetchOne(array(), Doctrine::HYDRATE_ARRAY);

      I get the error
      SQLSTATE[HY000]: General error: 10007 Incorrect syntax near ':'. [10007] (severity 5)

      If changing the query to
      $query = Doctrine_Query::create();
      $customer = $query->from('Customers')
      ->where("id = ?"
      , array($user['customer_id']))
      ->fetchOne(array(), Doctrine::HYDRATE_ARRAY);
      it works fine.
      Testing with MySQL works fine, so it seems contained to MSSQL

        Activity

        Dennis Pettersson created issue -
        Hide
        Dennis Pettersson added a comment -

        Should mention I upgraded from 1.1.6 to 1.2.2, so the problem might be present in earlier 1.2.x versions as well.

        Show
        Dennis Pettersson added a comment - Should mention I upgraded from 1.1.6 to 1.2.2, so the problem might be present in earlier 1.2.x versions as well.
        Dennis Pettersson made changes -
        Field Original Value New Value
        Affects Version/s 1.2.3 [ 10051 ]
        Affects Version/s 1.2.2 [ 10047 ]
        Priority Major [ 3 ] Blocker [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DC-665, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Dennis Pettersson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: