Augustino
01-04-2007, 02:36 AM
Hi
I want connect to database before of include("global.php"); trying to use the same connection, How can I do it?
In class_core.php have the functions to do it,
in the 154 line of init.php is calling to the function connect(), and the info of connection in config.php, then is really dispersed the functions, the most near to one "class" is in class_database_explain.php, but nothing of them using it like include, is working for me
Then Should I open a new connection? or not will be needed? or What files Should I include to open the existent conecction?, this before of load the global.php
Best Regards and Happy New Year :)
$conexion=mysql_connect("localhost","username","pass") or die ("no se ha podido conectar a la BD");
mysql_select_db("database") or die ("error");
$clasif = mysql_query("THE SELECT");
$listatemplate=mysql_result($consulta,0,"template");
$globaltemplates=explode(".", $listatemplate);
//After the global.php
require_once('./global.php');
Is working but I think not is so good idea because open a new connection, the which mean more resource usage instead of use the same connection of vBulletin
Anyother idea?
I want connect to database before of include("global.php"); trying to use the same connection, How can I do it?
In class_core.php have the functions to do it,
in the 154 line of init.php is calling to the function connect(), and the info of connection in config.php, then is really dispersed the functions, the most near to one "class" is in class_database_explain.php, but nothing of them using it like include, is working for me
Then Should I open a new connection? or not will be needed? or What files Should I include to open the existent conecction?, this before of load the global.php
Best Regards and Happy New Year :)
$conexion=mysql_connect("localhost","username","pass") or die ("no se ha podido conectar a la BD");
mysql_select_db("database") or die ("error");
$clasif = mysql_query("THE SELECT");
$listatemplate=mysql_result($consulta,0,"template");
$globaltemplates=explode(".", $listatemplate);
//After the global.php
require_once('./global.php');
Is working but I think not is so good idea because open a new connection, the which mean more resource usage instead of use the same connection of vBulletin
Anyother idea?