Project

General

Profile

Actions

Bug #17117

closed

Allow empty $from_table in SELECTquery()

Added by Daniel Hahler over 17 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2007-03-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)


Files

t3lib_db_select_without_tables.patch (761 Bytes) t3lib_db_select_without_tables.patch Administrator Admin, 2007-03-13 14:58
Actions #1

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF