Closed (fixed)
Project:
Drupal core
Version:
5.2
Component:
database system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2007 at 12:37 UTC
Updated:
11 Jul 2008 at 17:37 UTC
Today I had occasion to use hook_db_rewrite_sql to add a table join with no where conditions.
With no 'where' return array element defined, the WHERE key word was not inserted. With a blank 'where' element, the WHERE key word was added but with a blank condition. ie. '()'. All invalid SQL. So I used a condition of '1'.
This may sound like a strange thing to do, but it's quite valid to introduce a new table to get the join to cut down the result set. The 'where' return array element should not need to exist.
Comments
Comment #1
mot commentedClosed because of no activity since a long time.