From this code:
global $wpdb;
$sidebar_table = $wpdb->prefix . 'w3care_sidebar_position';
$checkad = $wpdb->get_results( $wpdb->prepare( "SELECT ad_id, sidebar_position, ad_type FROM `%s` WHERE page_id = '11646' AND page_type='page'",$sidebar_table ));
I'm getting the following error:
WordPress database error Table 'wp_rainnews.'wp_w3care_sidebar_position'' doesn't exist for query SELECT ad_id, sidebar_position, ad_type FROM `'wp_w3care_sidebar_position'` WHERE page_id = '11646' AND page_type='page' /* From [siteurl/] in [/urltopluginindex/index.php:855] */ made by .....
But I don't know how this is possible. If I echo $sidebar_table it returns wp_w3care_sidebar_position, so where is this wp_rainnews coming from? And what's with the quotes around it? If anyone can offer any help I would be very appreciative. :)