Screen/Report - calculated/concat fields [message #5597] |
Thu, 02 June 2016 11:55 |
htManager
Messages: 433 Registered: May 2014
|
Senior Member |
|
|
Can I display two or more field values as 'calculated' fields like this in a report (and/or in a screen):
$structure['title'][] = array('text' => 'CONCAT(vereine_kuerzel, \' - \', mannschaften_id)',
'width' => 100,
'align' => 'left',
'x' => 45);
I tried it with the SQL_FROM statement with a LEFT JOIN in the script file too but with no success.
$sql_from = 'training_plan_kopf '
. 'LEFT JOIN orga_mannschaften ON ('
. 'training_plan_kopf.vereine_kuerzel = orga_mannschaften.vereine_kuerzel AND '
. 'training_plan_kopf.mannschaften_id = orga_mannschaften.mannschaften_id) '
. 'CONCAT(vereine_kuerzel, \' - \', mannschaften_id) AS verein_id ';
The SQL statement brings up an error. You see an ending ')' behind the WHERE clause but no beginning one.
Or is there a better way?
|
|
|