Quote:
Originally Posted by NickyDee
What I want to do is insert the following code into a vbulletin page. How do I do it?
|
can you try this?
Code:
$Header
$header include
$navbar
_________________
mysql_connect("2nduser", "2ndpass", "remotehost") or die('Error connecting to mysql');
mysql_select_db("remoteDB");
$second_database
mysql_connect("vbuser", "vbpass", "localhost") or die('Error connecting to mysql');
mysql_select_db("vbDB");
______________
$footer
obviously, replace each parameter with your own
Another idea: what kind of connection do you have in your config.php? try using mysqli, I believe you can have a mysqli connection open for VB and a regular legacy mysql connection with the remote server.
Another one: you can download remote db contents to a textfile and parse it to fill a local table using your VB cron let's say twice a day.
Last one: log into your VB host phpmyadmin and run the SQL sentence:
you might have mysql compiled with FEDERATED engine support with would somewhat be an easier solution.