HomePhabricator

Use IDatabase::selectSQLText for the sub query

Authored by Mainframe98 on Jul 25 2019, 12:40 PM.

Description

Use IDatabase::selectSQLText for the sub query

Rather than manually stringing things together.
Additionally, since there is support for table aliases in the
database abstraction layer, use that, rather than raw SQL fragments.
This ensures table names are quoted and prefixed where necessary, while
also improving database backend compatibility.

Change-Id: I505cf1200dad97f1a3e2f876c3632c42eb1b2746

Details