2 // Wordpress database connection setup for atutor_wordpress integration module
3 require('wp_config.php');
6 if (AT_INCLUDE_PATH !== 'NULL') {
7 $db_wp= @mysql_connect(WP_DB_HOST.':'.WP_DB_PORT, WP_DB_USER, WP_DB_PWD);
10 /* AT_ERROR_NO_DB_CONNECT */
11 require_once(AT_INCLUDE_PATH . 'classes/ErrorHandler/ErrorHandler.class.php');
12 $err = new ErrorHandler();
13 trigger_error('VITAL#Unable to connect to db. Set database information in the module\'s wp_config.php file.', E_USER_ERROR);
16 if (!@mysql_select_db(WP_DB_NAME, $db_wp)) {
17 require_once(AT_INCLUDE_PATH . 'classes/ErrorHandler/ErrorHandler.class.php');
18 $err = new ErrorHandler();
19 trigger_error('VITAL#DB connection established, but database "'.WP_DB_NAME.'" cannot be selected.',