* ALIAS and FUNCTION detected? This may happen with SQL queries
* like: UNIX_TIMESTAMP(`foo_timestamp`) AS `foo_timestamp`
*/
+
+ // Fix missing 'NAME'
+ if (!isset($attributes['NAME'])) {
+ $attributes['NAME'] = '';
+ } // END - if
+
// Init array
$array = array(
'column' => trim($attributes['VALUE']),
$SQL = 'SELECT ';
// Get the sql part back from given array
- $SQL .= getSqlPartFromXmlArray($columnArray);
+ $SQL .= getSqlPartFromXmlArray($columns);
// Remove last commata and add FROM statement
$SQL .= ' FROM `{?_MYSQL_PREFIX?}_' . $tableName[0] . '`';