When I create a plugin I use the guide on the wordpress codex for create table:
function wll_speech_install () {
global $wpdb;
global $wll_speech_db_version;
$table_name = $wpdb->prefix . "wollyspeech";
if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
If i am on a blog the global wpdb $wpdb->prefix give me as a result tableprefix_numberofblog_ .
Mine problem is to have the table_prefix set in wp-config.php (i need it for reading users and users_meta table)-
Sorry for my english.