classes/PodsData.php
public static function table_create( $table, $fields, $if_not_exists = false ) {

		/**
		 * @var $wpdb wpdb
		 */
		global $wpdb;

		$sql = 'CREATE TABLE';

		if ( true === $if_not_exists ) {
			$sql .= ' IF NOT EXISTS';
		}

		$sql .= " `{$wpdb->prefix}" . self::$prefix . "{$table}` ({$fields})";

		if ( ! empty( $wpdb->charset ) ) {
			$sql .= " DEFAULT CHARACTER SET {$wpdb->charset}";
		}

		if ( ! empty( $wpdb->collate ) ) {
			$sql .= " COLLATE {$wpdb->collate}";
		}

		return self::query( $sql );
	}
public static function table_create( $table, $fields, $if_not_exists = false ) {

		/**
		 * @var $wpdb wpdb
		 */
		global $wpdb;

		$sql = 'CREATE TABLE';

		if ( true === $if_not_exists ) {
			$sql .= ' IF NOT EXISTS';
		}

		$sql .= " `{$wpdb->prefix}" . self::$prefix . "{$table}` ({$fields})";

		if ( ! empty( $wpdb->charset ) ) {
			$sql .= " DEFAULT CHARACTER SET {$wpdb->charset}";
		}

		if ( ! empty( $wpdb->collate ) ) {
			$sql .= " COLLATE {$wpdb->collate}";
		}

		return self::query( $sql );
	}
public static function table_create ( $ table , $ fields , $ if_not_exists = false ) { /**
		 * @var $wpdb wpdb
		 */ global $ wpdb ; $ sql = 'CREATE TABLE' ; if ( true === $ if_not_exists ) { $ sql .= ' IF NOT EXISTS' ; } $ sql .= " `{$wpdb->prefix}" . self :: $ prefix . "{$table}` ({$fields})" ; if ( ! empty ( $ wpdb -> charset ) ) { $ sql .= " DEFAULT CHARACTER SET {$wpdb->charset}" ; } if ( ! empty ( $ wpdb -> collate ) ) { $ sql .= " COLLATE {$wpdb->collate}" ; } return self :: query ( $ sql ) ; }
Create a Table

@param string  $table         Table name.
@param string  $fields
@param boolean $if_not_exists Check if the table exists.

@return array|bool|mixed|null|void

@uses  PodsData::query

@since 2.0.0
Create a Table