If using Mssql with the driver https://www.drupal.org/project/sqlsrv there is a fatal error when accessing
the translation overview page admin/content/translation-overview-manage.

PDOException: SQLSTATE[42000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect syntax near 'LIMIT'.: SELECT n.[nid] AS nid, n.[title] AS title, n.[type] AS type, n.[created] AS created FROM node n WHERE ([n].[type] IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7, :db_condition_placeholder_8, :db_condition_placeholder_9)) AND ((n.nid = n.tnid OR n.tnid = 0) AND n.[language] <> '' AND n.[language] IS NOT NULL) LIMIT 50 OFFSET 0

The reason is the way a select query is build, by bypassing the database specific driver
and using directly the default SelectQuery class.

The solution is to use db_select(), this way in my case the SelectQuery_sqlsrv
builds the range into the query the right way.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Solthun created an issue. See original summary.

Solthun’s picture