including multiple mysqli connections on one php page

Hi,

I want to display data from two databases on the same php page, using multiple include files - all of them currently working, when I try and add:

[php]include_once ‘./includes/search_statistics.php’;[/php]

Onto my page I receive the following errors (connections are running locally on my pc):

php_network_getaddresses: getaddrinfo failed: No such host is known.

I have two config files, the above error relates to to the wv_db_con mysqli instance line (other lines appear after but they are all related(I think)):

[php]

<?php require_once 'config.php'; $wv_db_con = new mysqli(WV_HOST, WV_USER, WV_PASS, WV_DB); ?>

[/php]

[php]<?php
require_once ‘sec_config.php’; // As functions.php is not included
$mysqli_sec = new mysqli(HOST, USER, PASSWORD, DATABASE);
?>[/php]

The main reason i use the mysql_sec instance is for dealing with user profiles, the other instance (wv_dv_con) returns data to display to the user. I obviously already include the _sec includes on most pages (to determine the user is logged in or not). When I try and add the line at the top of this, which I am hoping to return around 6 pieces of data from the database as variables (to use within the HTML).

Is this even possible or am I breaking some rules over php/mysqli?

I appreciate your help/advice, I have looked through stackexchange etc without any help. I also

Sponsor our Newsletter | Privacy Policy | Terms of Service