Hi everybody, I have just started to take a peak at the WordPress database class, and have fallen into a problem, which I myself seems to be unable to resolve. Your help in this regard will highly be appreciated.
Below please find the complete code of the test code I have written to get started with it. I have stored it under the root folder of a running WordPress instance.
<?php
global $wpdb;
$myrows = $wpdb->get_results( "SELECT * FROM wp_posts" );
?>
I know there must be some silly sort of error here .. may be something like $wpdb is out of the WordPress framework.
The error returned is
Fatal error: Call to a member function get_results() on a non-object in E:\xampp-w32\www\chadnicely\wyomingbuyhomes.com\testtool.php on line 4
I will really appreciate a quick response on this.
TIA