Problem
I have two different plugin tables and I want to get their value by sql. Problem is id where I cannot find connection which I can retrieve data.
Table 1 (bdt_mappress_posts)
postid = 2 and mapid = 3
Table 2 (bdt_mappress_maps)
mapid = 3 and obj = json
<? $postid = get_the_ID();
$results = $GLOBALS['wpdb']->get_results( 'SELECT obj FROM bdt_mappress_maps INNER JOIN bdt_mappress_posts WHERE bdt_mappress_maps.mapid = bdt_mappress_posts AND bdt_mappress_posts.postid ='.$postid); print_r($results);
?>
$postid returns me id of the post. The sql returns me empty value, I know sql but not so strong. If someone can help me or give related post which I can find answer. Thanks beforehand!