Hello,
I am using this sql query to find the member_id from the screen_name
{exp:query sql="SELECT member_id FROM exp_members WHERE screen_name = 'Admin' "}
{member_id}
{/exp:query}and it works perfectly. The problem I am having is trying to assign the now retrieved member_id to an {exp..} parameter.
I have the query in a snippet but if try and assign the snippet to a parameter, the parameter pulls the whole code from the snippet and not just the member_id, which causes my template code to fail.
Is there a way of assigning the retrieved member ID to a variable which I can then use in the {exp…} tags or a way of getting expression engine to parse the snippet fully before trying to assign it to the parameter?
I hope that explanation made sense :(
T.