Last active
June 12, 2019 21:30
-
-
Save eto4detak/4750ceae5e060d9bd52f2c50c0005dcf to your computer and use it in GitHub Desktop.
wp php sql table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// create table | |
if( !$wpdb->query( $wpdb->prepare("SHOW TABLES LIKE '%s'", $AUTO_license['table_name'] ) ) ){ | |
create_table_key_activate(); | |
} | |
$table_name = $wpdb->get_blog_prefix() . 'test_table331234'; | |
if($wpdb->query("SHOW TABLES LIKE '$table_name'")){ | |
$wpdb->query( $wpdb->prepare("SHOW TABLES LIKE '%s'", $table_name ) ); | |
echo 1; | |
}else{ | |
echo 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment