I was putting a @SELECT binding in a tv and then noticed that /manager/includes/tmplvars.inc.php does not try to split up the results into "option==value"-style elements, like it does for manually entered input elements.
Changing the lines:
list($item,$itemvalue) = (is_array($itemvalue)) ? $itemvalue : explode("==",$itemvalue);
into:
list($item,$itemvalue) = (is_array($itemvalue)) ? explode("==",$itemvalue[0]) : explode("==",$itemvalue);
solves that.
And that way I can do bindings like "@SELECT CONCAT(id,’==’,pagetitle) from modx_site_content" , so the id is the value stored in the tv.
Wouldn’t this be better or does this reflect on other things? I’m just testing in my sandbox.