Huge thanks to @kero !!
I was finally able to create a solution by making the sql statement a variable first (as kero suggested) then using that variable on wpdb->query();
Here’s my updated and fully working codes now:
$imdbid = $_GET['id'];
$string = file_get_contents("http://www.omdbapi.com/?i=".$imdbid."&apikey=9a187152");
$json = json_decode($string, true);
if( $json['Response'] === "True" ){
$dataID = $json['imdbID'];
$dataTitle = $json['Title'];
$dataYear = $json['Year'];
$dbdata = array(
'post_title' => $dataID,
'post_status' => 'publish',
'post_type' => 'datadb',
'post_author' => 1
);
if( $dbid = wp_insert_post( $dbdata ) ){
$statement = "INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES ('".$dbID."', 'datadb_imdb_id', '%s'), ('".$dbID."', 'datadb_title', '%s');";
$sql = $wpdb->prepare($statement, $dataID, $dataTitle);
$wpdb->query($sql);
}
}