Can someone help me WHY this not working? i cant assign the {logged_in_member_id} as a var to the query. if I manually put the member_id=1 .. it works. but its not reading the {logged_in_member_id} var.
{exp:query sql="SELECT * FROM exp_member_data WHERE member_id='{logged_in_member_id}’”} {m_field_id_7} {/exp:query}
you’re attempting to embed a tag directly into a tag - that can fail.
instead use an embed for the query and pass the tag to it.
example
embed template (embeds/.my_embed) containes:
called like:
(embed="embeds/.my_embed" mid="{logged_in_member_id}"}
Of course you\ll need to check for invalid/blank values (you should be doing that anyway when using exp:query).
Trying to post you the correct code but the forum keeps modifying it (moves my quotes) - hope you get the jist.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.