Configurable Reports Custom Variables

Re: Configurable Reports Custom Variables

by James Todd -
Number of replies: 1
Thanks, that brings up my own results.

I've currently cut the code right back to see if I can just see a list of my staff.
without the %%USERID%% variable it just show a list of people who have put their own email address in the manager field by accident, or they manage themselves, Lucky people.


SELECT DISTINCT u.id AS userid, u.username AS staff, u.email AS email, uid.data AS manager

FROM prefix_user as u
JOIN prefix_user_info_data AS uid ON uid.userid = u.id

WHERE u.id = %%USERID%%
AND u.email = uid.data
In reply to James Todd

Re: Configurable Reports Custom Variables

by James Todd -
Can Juan Leyva or Sara Ajona Tellez comment on this please.

Basically how do I create a variable for current user email address.