Page 1 of 1

PostPosted: Tue Jun 27, 2006 6:00 am
by sym
I would like to add some information of one table to another table:

table1: [EMPLOYEES_BUSINESS]
EMPLOYEE_ID ; EMPLOYEE_FIRSTNAME ; EMPLOYEE_MIDDLENAME ; EMPLOYEE_LASTNAME ; EMPLOYEE_ROOM

212 ; Jan ; van ; Geffen ; 0.014
10913 ; Jan ; van ; Schaijk ; 0.014


table2: [EMPLOYEE_ROOM]
ROOM_ID ; EMPLOYEE_ROOM ; EMPLOYEE_DESCRIPTION

1 ; 0.014 ; xxxx xxxx xxxx xxxxx
2 ; 1.009 ; yyy yyy yyy yyyy yyy


I would like table EMPLOYEE_ROOM display as:

Room-Persons ; EMPLOYEE_ROOM ; EMPLOYEE_DESCRIPTION

Geffen van, Jan / ; 0.014 ; xxxx xxxx xxxx xxxxx
Schaijk van, Jan

Is this possible with the valuelists.ini definition file ?
I tried a few combinations... but i didn't get it fixed.

Greetings Nico Sijm

PostPosted: Tue Jun 27, 2006 6:36 am
by sym
I tried:

[EMPLOYEES_BUSINESS]
__sql__ = "SELECT EMPLOYEE_ROOM, CONCAT(EMPLOYEE_LASTNAME, ' ',EMPLOYEE_MIDDLENAME,',', EMPLOYEE_FIRSTNAME) as FullName FROM EMPLOYEES_BUSINESS WHERE EMPLOYEE_ROOM = '$EMPLOYEE_ROOM' ORDER BY EMPLOYEE_LASTNAME"

But no output...

PostPosted: Tue Jun 27, 2006 7:25 am
by shannah
Hi,

Valuelists, unfortunately are not dynamic. The problem with your query is that it includes a variable '$EMPLOYEE_ROOM'. This will get rendered as ''.

-Steve