Hi,
Im trying to get the member_forum_rank on a template outside on the forum with
{exp:query sql="
SELECT
SUM(total_forum_topics+total_forum_posts)
AS total_forum_posts_for_rank
FROM exp_members
WHERE member_id = '<?php global $SESS; echo $SESS->userdata['member_id'];?>' "}
{exp:query sql="SELECT rank_title FROM exp_forum_ranks WHERE rank_min_posts <= '{total_forum_posts_for_rank}'"}
{if count == {total_results}}{rank_title}{/if}
{/exp:query}
{/exp:query}which work only if i hardcode the member_id, how can i get the {logged_in_member_id} there dynamicly?
i have php enabled, parse on input and caching is off
this is the error i get:
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''
Filename: modules/query/mod.query.php
Line Number: 181if i only call (leaving the exp:query out)
<?php global $SESS; echo $SESS->userdata['member_id'];?>i get:
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: libraries/Functions.php(680) : eval()'d code
Line Number: 50