Not able to do a simple SELECT from a table with Code Snippets
-
Hi, great plugin!
I am trying some basic code to access a table and I get an error.
This is the code:
$id = $wpdb->get_results(“SELECT user_login FROM wpud_users WHERE ID = 1”);
// Echo the title of the first scheduled post
echo $id[0]->user_login;This is the error:
Fatal error: Uncaught Error: Call to a member function get_results() on null in /home/ikid2684/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(361) : eval()’d code:1
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Not able to do a simple SELECT from a table with Code Snippets’ is closed to new replies.