Issue Bug Closed

#17117Allow empty $from_table in SELECTquery()

Daniel Hahler 03/13/07, 14:58 updated 09/06/13, 09:06

Description

The following query will fail:
$TYPO3_DB->exec_SELECTquery( ‘SELECT 1’, ‘’, ‘’);

because it builds a query like:

SELECT DATE_FORMAT( SUBDATE, “%d.%m.%Y” );
FROM

The above example is kind of stupid, but it can make sense to use queries without a table, e.g. when using MySQL for date handling.

The attached patch will handle an empty $from_table correctly, by omitting the “FROM”.
(issue imported from #M5215)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.