I have two tables, one called location_name it looks like this,
location shortname longname precolor color hidden
1 STO Stockholm #00FF00 #FF0000 0
2 GBG Gothenburg #00FFFF #FF00FF 0
3 MMO Malmö #C6C6C6 #008000 0
4 CPH Copenhagen #FF0080 #FF8000 0
5 ARH Ã…rhus #80FF80 #8000FF 1
6 SER Service #FFFF00 #FFFF00 1
and the other one, called art_tot, looks lite this
artnr art art_text gnr gnr_group sortorder hide location
220101 Thing description 2201 1 101 0 3
220102 Thing description 2201 1 102 0 2
220103 Thing description 2201 1 103 0 3
and im making a that looks something like this
Pos Equipment Artnr Mon 27-10-2014 Tue 28-10-2014 Wed 29-10-2014 Thu 30-10-2014 Fri 31-10-2014 Sat 01-11-2014 Sun 02-11-2014
STO Thing 220101
STO Thing 220102
STO Thing 220103
STO Thing 222001
What i need to do is, color the Pos to the correct color from location_name and have the correct shortname and have the title be the longname.
So i somehow have to make the the Pos TD get the correct values from location_name based on the location column from art_tot
Or is there a simpler way to do this?