Browse code

테이블 이름 수정

Nepirity Corp authored on23/03/2018 15:35:19
Showing1 changed files

... ...
@@ -27,7 +27,7 @@ class admin_table_plugin {
27 27
 
28 28
   public function get_table_name() {
29 29
     global $wpdb;
30
-    return $wpdb->prefix.'customers2';
30
+    return $wpdb->prefix.'customers';
31 31
   }
32 32
 
33 33
   public function install() {
... ...
@@ -36,10 +36,10 @@ class admin_table_plugin {
36 36
 
37 37
     if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
38 38
       $sql = "CREATE TABLE $table_name (
39
-        id mediumint(9) NOT NULL AUTO_INCREMENT,
40
-        field_x text NOT NULL,
41
-        field_y text NOT NULL,
42
-        UNIQUE KEY id (id)
39
+        ID int auto_increment primary key,
40
+        name text,
41
+        address text,
42
+        city text
43 43
       ) ;";
44 44
       require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
45 45
       dbDelta( $sql );