How to use $wpdb in plugin
-
Hello
I’m trying to use $wpdb from a selfmade plugin. (Because obviously, I want to make my own queries and get the results from db)
The problem is: I just can’t use $wpdb for some reason.
Even something simple likeglobal $wpdb; $result = $wpdb->get_results("select * from wp_posts");
will make my .php file crash and stop doing anything…
What am I missing or doing wrong?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to use $wpdb in plugin’ is closed to new replies.