Bug #17117 ยป t3lib_db_select_without_tables.patch
class.t3lib_db.php (working copy) | ||
---|---|---|
// Table and fieldnames should be "SQL-injection-safe" when supplied to this function
|
||
// Build basic query:
|
||
$query = 'SELECT '.$select_fields.'
|
||
FROM '.$from_table.
|
||
(strlen($where_clause)>0 ? '
|
||
$query = 'SELECT '.$select_fields;
|
||
// table(s) (this may be empty e.g. for "SELECT 1")
|
||
if (strlen($from_table)) {
|
||
$query.= '
|
||
FROM '.$from_table;
|
||
}
|
||
// Where:
|
||
if (strlen($where_clause)>0 ) {
|
||
$query.= '
|
||
WHERE
|
||
'.$where_clause : '');
|
||
'.$where_clause;
|
||
}
|
||
// Group by:
|
||
if (strlen($groupBy)>0) {
|