Simplify not equal operator '!=' is not supported by all databases, must be '<>'

Created on 22 July 2011, almost 14 years ago
Updated 4 May 2025, 9 days ago

@catch reminded me of this in #1164852-65: Inconsistencies in field language handling , and it turned out that core uses the wrong operator all over the place.

Attached patch is a quick fix. Note that I only grepped for '!='. I don't think there are any instances of "!=", but there may very well be instances of != in plain db_query*() SQL strings.

For D8+ (separate issue), we should remove support for '!=' from EFQ and also throw an exception in DatabaseCondition::condition() in case $operator == '!=' is passed. (No magic conversion -- otherwise, people won't understand this ever.)

📌 Task
Status

Fixed

Version

7.0 ⚰️

Component

base system

Created by

🇩🇪Germany sun Karlsruhe

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • API change

    Changes an existing API or subsystem. Not backportable to earlier major versions, unless absolutely required to fix a critical bug.

  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024