I'm using
@SELECT `pagetitle` AS `name`,`id` FROM `[[+PREFIX]]site_content` WHERE `published` = 1
To populate a multiselect listbox TV. I want to limit this to the current context (I've got 10 contexts running). Is there someway to grab the current context and include it in my WHERE statement or am I going to be stuck using @EVAL to run a snippet to populate the variable instead of @SELECT?
Basically, I'd like to do something like
@SELECT `pagetitle` AS `name`,`id` FROM `[[+PREFIX]]site_content` WHERE `published` = 1 AND `context_key` = [[*context_key]]
but obviously i can't use a tag here. Can I run @EVAL inside @SELECT to return a value from a snippet?
Any ideas?