クラス wpdb::select()
クラス wpdb::select()
定義ファイル :/blog/wp-includes/wp-db.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | public function select( $db, $dbh = null ) { if ( is_null($dbh) ) $dbh = $this->dbh; if ( $this->use_mysqli ) { $success = @mysqli_select_db( $dbh, $db ); } else { $success = @mysql_select_db( $db, $dbh ); } if ( ! $success ) { $this->ready = false; if ( ! did_action( 'template_redirect' ) ) { wp_load_translations_early(); $this->bail( sprintf( __( '<h1>Can’t select database</h1> <p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p> <ul> <li>Are you sure it exists?</li> <li>Does the user <code>%2$s</code> have permission to use the <code>%1$s</code> database?</li> <li>On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?</li> </ul> <p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="https://wordpress.org/support/">WordPress Support Forums</a>.</p>' ), htmlspecialchars( $db, ENT_QUOTES ), htmlspecialchars( $this->dbuser, ENT_QUOTES ) ), 'db_select_fail' ); } return; } } |