Tuesday 21 December 2004 12:41:13 am
I want to use a dedicated database for an extension so i can use the same extension in different ez sites. When i try to connect to the extension database for inserting data, the site data will not be shown. What do i do wrong or is it impossible to have 2 database connections at once. When i use getDB the ez content won't be shown. * * * script * * * * * * * * * function getDB($dbname = "") {
global $arrdbaccess;
if ($dbname == "") {
$dbname = $arrdbaccess["dbname"]; }
if (mysql_select_db ( $dbname )) {
return true;
} else {
return false;
} }
function run_thisquery($query, $strid = "") {
global $arrdbaccess, $objconn; $dbname = $arrdbaccess["dbname"];
#voer een insert of update query uit. retourneer bij een insert het autoincrement id
openConnection($objconn);
mysql_select_db ( $dbname );
mysql_query($query);
if (($strid == "") or ($strid == "0")) {
$strid = mysql_insert_id();
}
mysql_query("COMMIT");
closeConnection($objconn);
return $strid; }
|