Outputting query results

By default, wordpress get_results return a numerically array of objects, so to use echo to print your data yo should do something like; foreach($myrows as $line){ echo $line->question; }

No users table in WordPress’s database

Normally WordPress does not allow you to delete ‘super admin’ through its dashboard, all other users can be deleted. But in your case I think, its some one who deleted all users from the table directly by accessing your WordPress database via phpmyadmin or so. Even if there is no users in the site, the … Read more

Getting data from Mysql Table..confusing

Bulk of WP’s native data structures aren’t meant for direct MySQL access. They are typically accessed via PHP APIs which take care of MySQL generation/execution and many more things, such as allowing to filter data, caching it for performance, and so on. Your issue here is that from MySQL point of view meta values aren’t … Read more

Create Pages for database content

You probably don’t need a custom table. Read the top answer to this question which recommends using Custom Post Types. As for displaying the data, I’d recommend you investigate Custom Page Templates. Then you can create a page that loads your data however you’d like.

Why doesn’t custom mysql query return results? Is syntax correct?

You’re including the table prefix, but $wpdb takes care of that. Change: $query = $wpdb->prepare( “SELECT * FROM $wpdb->wp_terms INNER JOIN $wpdb->wp_term_taxonomy ON ($wpdb->wp_terms.term_id = $wpdb->wp_term_taxonomy.term_id) WHERE $wpdb->wp_terms.name LIKE %s AND $wpdb->wp_terms.count > 0”, $wpdb->esc_like($keyword) . ‘%’); To: $query = $wpdb->prepare( “SELECT * FROM $wpdb->terms INNER JOIN $wpdb->term_taxonomy ON ($wpdb->terms.term_id = $wpdb->term_taxonomy.term_id) WHERE $wpdb->terms.name LIKE … Read more