Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //absolute path to wp-load.php, or relative to this script
- //e.g., ../wp-core/wp-load.php
- //include( '../../hostcals.localhost/wp-load.php' );
- //grab the WPDB database object, using WP's database
- //more info: http://codex.wordpress.org/Class_Reference/wpdb
- global $wpdb;
- global $customTerms;
- //make a new DB object using a different database
- //$mydb = new wpdb('username','password','database','localhost');
- $mydb = new wpdb('****','*****','*****','******'); //hidden for my protection
- $allUsers = $wpdb->get_results("SELECT * FROM $wpdb->users");
- $custTermQuery = "SELECT slug FROM wp_47_terms";
- $customTerms = $wpdb->get_results($custTermQuery); ?>
- <pre>
- <?php// print_r($customTerms); ?>
- </pre>
- <?php function wcmcAutoComplete($customTerms){
- return json_encode($customTerms);
- } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement