$wpdb->get_results($wpdb->prepare()) not working

I am creating simple displaying lists of uses in wordpress. I am using below code for that

$results = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->users WHERE name = %s",$name);

This above query is not working because of ” $wpdb->users ” that is table name but when I use only “users” that is table name it works.

Read More

Please help me whether am I missing something in the code

Related posts

1 comment

Comments are closed.