Changeset 10447 for trunk/wp-admin/includes/upgrade.php
- Timestamp:
- 01/27/2009 10:35:21 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/upgrade.php
r10150 r10447 927 927 function maybe_create_table($table_name, $create_ddl) { 928 928 global $wpdb; 929 foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { 930 if ($table == $table_name) { 931 return true; 932 } 933 } 929 if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name ) 930 return true; 934 931 //didn't find it try to create it. 935 932 $q = $wpdb->query($create_ddl); 936 933 // we cannot directly tell that whether this succeeded! 937 foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { 938 if ($table == $table_name) { 939 return true; 940 } 941 } 934 if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name ) 935 return true; 942 936 return false; 943 937 }
Note: See TracChangeset
for help on using the changeset viewer.