I want to use wordpress function get_current_user_id() call like
select * from tablename where userid = get_current_user_id() as the requirement is to show chart for particular user id.
If calling get_current_user_id() is not possible, is there any other way to pass user ID of currently logged in user to the query?