WordPress get results

function my_plugin_get_results () {
	global $wpdb;
	$table_name = $wpdb->prefix . "plugin_table";
	$active_rows = $wpdb->get_results(
		"SELECT * FROM {$table_name}"
	);

	foreach ($active_rows as $active_row){
		echo $active_row->the_title;
	}
}
Share on Facebook0Tweet about this on Twitter0Share on Google+0Pin on Pinterest0Share on LinkedIn0Share on Reddit0
It's only fair to share...

Add Comment

Required fields are marked *. Your email address will not be published.