Extension, Module



ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From Mark Croxton


Stash Variable in a Query Tag Parameter

Support Request

John de Beer
John de Beer

Is there a way to use a stash variable as a search parameter with a query tag? Something like:

{exp:stash:set parse_tags=“yes” parse_conditionals=“yes”}
<—Find some user by username.—>
{exp:query sql=“SELECT member_id, group_id FROM exp_members WHERE username = ‘something’ “}



<—Find A Member Group with group_id != {stash:group_id}{group_id}{/stash:group_id}—>
{exp:query sql=“SELECT group_id FROM exp_member_groups WHERE group_id != WHAT? “}

Do stuff



Any suggestions appfreciated

John de Beer
# 1
John de Beer

It’s OK Mark - I figured it out, using something like ‘{exp:stash:my_var}’ as the parameter.

John de Beer
# 2
John de Beer

I was wrong - did not work, even with parse=“inward”. Would appreciate a hint, even of not possible to do this - thanks