CoffeeLovesYou
01-21-2013, 10:24 PM
Hi,
In all of my scripts, I have the mysql connection, as well as the selection of the mysql database.
However, the connection and the database is the same one defined in the vBulletin config.
My plugins are all using global_start.
How can I erase my db connection from my script to use the one vB is already using?
Sample script I am using:
ob_start();
?>
<center><?php
//this is the same as my vBulletin's db connection info in config.php
$link = mysql_connect("localhost","user","password");
mysql_select_db(databasename);
?>
<html>
<body>
<?php
$sql = mysql_query("my query here");
//stuff here
echo "hi";
?>
</html></center>
<?php
$countsrr = ob_get_contents();
ob_end_clean();
In all of my scripts, I have the mysql connection, as well as the selection of the mysql database.
However, the connection and the database is the same one defined in the vBulletin config.
My plugins are all using global_start.
How can I erase my db connection from my script to use the one vB is already using?
Sample script I am using:
ob_start();
?>
<center><?php
//this is the same as my vBulletin's db connection info in config.php
$link = mysql_connect("localhost","user","password");
mysql_select_db(databasename);
?>
<html>
<body>
<?php
$sql = mysql_query("my query here");
//stuff here
echo "hi";
?>
</html></center>
<?php
$countsrr = ob_get_contents();
ob_end_clean();