PDA

View Full Version : Outside Database Connection Issue


Masked Crusader
05-21-2010, 09:26 PM
Hello.

I am trying to create a new SQL string in a vB script so that the data that is being collected also gets populated on another off-server database.

On submission of the data, I am doing this:

$con = mysql_connect("myipaddress", "myusername", "mypassword");
mysql_select_db('mydbname', $con);
$register_sql = "mySQLstring";
mysql_query($register_sql, $con) or die(mysql_error());
mysql_close($con);

It is not connecting to the database though. It seems that the current vBulletin connection might be screwing up somehow.

Any ideas?

ragtek
05-22-2010, 10:58 AM
maybe you wanna use this=> http://www.vbulletin.com/forum/showthread.php?351044-Using-second-databaseconnection-in-2-widgets ? :D

Marco van Herwaarden
05-24-2010, 03:04 AM
Shouldn't:
$register_sql = "mySQLstring";
be:
$register_sql = "$mySQLstring";
PS What is the error you get?