Index: trunk/globals.php =================================================================== diff -u -r529 -r534 --- trunk/globals.php (.../globals.php) (revision 529) +++ trunk/globals.php (.../globals.php) (revision 534) @@ -125,7 +125,7 @@ function GetNextResourceId($Increment=1) { $sql = "UPDATE ".GetTablePrefix()."IdGenerator SET lastid=lastid+".$Increment; - $adodbConnection = GetADODBConnection(); + $adodbConnection = &GetADODBConnection(); $adodbConnection->Execute($sql); $rs = $adodbConnection->Execute("SELECT lastid FROM ".GetTablePrefix()."IdGenerator"); $val = $rs->fields["lastid"]; @@ -181,7 +181,7 @@ function TableCount($TableName, $where="",$JoinCats=1) { - $db = GetADODBConnection(); + $db = &GetADODBConnection(); if(!$JoinCats) { $sql = "SELECT count(*) as TableCount FROM $TableName"; @@ -207,7 +207,7 @@ if(strpos($countsql,"ORDER BY")) $countsql = substr($countsql,0,strpos($countsql,"ORDER BY")); - $db = GetADODBConnection(); + $db = &GetADODBConnection(); $rs = $db->Execute($countsql); //echo $countsql."
\n"; $res = $rs->fields["TableCount"]; @@ -646,7 +646,7 @@ $sql = "SELECT min($Field) as val FROM $Table "; if(strlen($where)) $sql .= "WHERE $Where"; - $ado = GetADODBConnection(); + $ado = &GetADODBConnection(); $rs = $ado->execute($sql); if($rs) $ret = (int)$rs->fields["val"]; @@ -856,7 +856,7 @@ $sql = "SELECT Name from $cat_table WHERE ParentId=$ParentId AND "; $sql .="(Name LIKE '".addslashes($Name)."' OR Name LIKE 'Copy of ".addslashes($Name)."' OR Name LIKE 'Copy % of ".addslashes($Name)."')"; - $ado = GetADODBConnection(); + $ado = &GetADODBConnection(); $rs = $ado->Execute($sql); $ret = array(); while($rs && !$rs->EOF) @@ -873,7 +873,7 @@ $sql = "SELECT $Field FROM $Table INNER JOIN $cat_table ON ($Table.ResourceId=$cat_table.ItemResourceId) "; $sql .=" WHERE ($Field LIKE 'Copy % of $Name' OR $Field LIKE '$Name' OR $Field LIKE 'Copy of $Name') AND CategoryId=$CategoryId"; //echo $sql."
\n "; - $ado = GetADODBConnection(); + $ado = &GetADODBConnection(); $rs = $ado->Execute($sql); $ret = array(); while($rs && !$rs->EOF) @@ -1380,7 +1380,7 @@ if( count($import_scripts) == 0 ) { $sql = 'SELECT * FROM '.GetTablePrefix().'ImportScripts ORDER BY is_id'; - $db =& GetADODBConnection(); + $db =&GetADODBConnection(); $rs = $db->Execute($sql); if( $rs && $rs->RecordCount() > 0 ) {