Good morning,
in a list I have an element that I called COLOR of type checkbox (where the values are 1, 2, 3, ... while the labels are: white, pink, red, ...)
In another list I wanted to create an element that would give me the labels (white, pink, red) if the id of the first list and the second list matched.
I have tried with a query inserted in a calc element, but I can only see the values (1, 2, 3) and not the labels.
The query I use is this:
Is it possible to view the labels?
Thanks a lot to everyone!
in a list I have an element that I called COLOR of type checkbox (where the values are 1, 2, 3, ... while the labels are: white, pink, red, ...)
In another list I wanted to create an element that would give me the labels (white, pink, red) if the id of the first list and the second list matched.
I have tried with a query inserted in a calc element, but I can only see the values (1, 2, 3) and not the labels.
The query I use is this:
Code:
$mydb = JFactory::getDBO();
$mydb->setQuery(" SELECT mytable.color FROM mytable WHERE mytable.id = '{rowid}' ");
$rows = $mydb->loadObjectList();
$myhtml = "";
foreach ($rows as $row) {
$myhtml .= $row->color." ";
}
return $myhtml;
Is it possible to view the labels?
Thanks a lot to everyone!