<?php 

function createDbTable($name, $sql) {
   global $wpdb;
   
   define('ABSPATH', get_admin_url());
	  
   $sql = "CREATE TABLE " . $name . " (". $sql .");";

   require_once(ABSPATH . 'wp-admin/includes/upgrade.php');		   
   dbDelta($sql);
 
}

?>