• aryone

    (@aryone)


    I tried to use a variable $seplog_logged_userID in a WHERE clause, like in your example SELECT * FROM wp_users WHERE user_login=’#user_login#;’ but can not get it working. This is the query: SELECT radio_posi AS posicao, COUNT( * ) contador FROM SaveContactForm7_2 WHERE num_ident = ′$seplog_logged_userID;′ GROUP BY posicao ORDER BY posicao ASC . I tried with (“, ‘, #) and nothing works.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter aryone

    (@aryone)

    In the previous question I did not understand that only the WordPress user could be accessed. Now I included the command global $seplog_logged_userID, and changed the command $dss_sql_string=str_replace (“#user_login#”, $seplog_logged_userID, $dss_sql_string) on these two files: display-stats-getdata-single.php and display-stats-chart.php. Now I can access the ID of a logged user, generating charts depending on who is logged on the front end.

Viewing 1 replies (of 1 total)
  • The topic ‘User variable in WHERE clause’ is closed to new replies.