Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( ! defined( 'ABSPATH' ) ) {
- exit; // Exit if accessed directly.
- }
- global $wpdb;
- $prefixd=$wpdb->prefix;
- $table=$prefixd.'tbl_area';
- $charset_collate = $wpdb->get_charset_collate();
- $sql = "CREATE TABLE $table (
- id mediumint(9) NOT NULL AUTO_INCREMENT,
- name tinytext NOT NULL,
- code text NOT NULL,
- user_id int,
- status int,
- note text NOT NULL,
- created_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
- update_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
- PRIMARY KEY (id)
- ) $charset_collate;";
- require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
- dbDelta( $sql );
Add Comment
Please, Sign In to add comment