Replace direct mysql_xxx() calls with query_xxx() calls. Replace calls to mysql_insert_id()

with calls specific to the appdb or bugzilla database. Fixes a bug where a call to
mysql_insert_id() can potentially retrieve an id from either the bugzilla or appdb database,
depending on whichever database was last opened by mysql_connect().
This commit is contained in:
Chris Morgan
2007-08-03 23:27:25 +00:00
committed by WineHQ
parent 03dca3cabd
commit 6119246b51
54 changed files with 343 additions and 295 deletions

View File

@@ -37,8 +37,8 @@ else
$hResult = query_parameters($sQuery, "downloadurl", $sLicense);
}
if($hResult && mysql_num_rows($hResult))
$num = mysql_num_rows($hResult);
if($hResult && query_num_rows($hResult))
$num = query_num_rows($hResult);
$iNumPages = isset($num) ? ceil($num/$aClean['iNumVersions']) : 0;
@@ -108,7 +108,7 @@ if(!$sLicense)
$aClean['iNumVersions']);
}
if($hResult && mysql_num_rows($hResult))
if($hResult && query_num_rows($hResult))
{
echo html_frame_start("", "90%");
@@ -127,7 +127,7 @@ if($hResult && mysql_num_rows($hResult))
$oTableRow->SetClass("color4");
$oTable->AddRow($oTableRow);
for($iIndex = 1; $oRow = mysql_fetch_object($hResult); $iIndex++)
for($iIndex = 1; $oRow = query_fetch_object($hResult); $iIndex++)
{
$oVersion = new version($oRow->versionId);