Zend Framework

Zend_Db_Select::_renderOrder() incorrectly converts integers to quoted identifiers

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.4
  • Fix Version/s: 1.9.3
  • Component/s: Zend_Db_Select
  • Labels:
    None

Description

This is a perfectly valid SQL query (in Oracle anyway)

SELECT * FROM TABLE ORDER BY 1 ASC

however, setting the order clause using $select->order(1) causes the query to be assembled as

SELECT "TABLE".* FROM "TABLE" ORDER BY "1" ASC

which fails with Zend_Db_Statement_Oracle_Exception: 904 ORA-00904: "1": invalid identifier

Activity

Hide
Benjamin Eberlei added a comment -

Patch plus 3 tests

Show
Benjamin Eberlei added a comment - Patch plus 3 tests
Hide
Benjamin Eberlei added a comment -

Fixed in trunk and merged into 1.9 release branch

Show
Benjamin Eberlei added a comment - Fixed in trunk and merged into 1.9 release branch

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: