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

@@ -30,7 +30,7 @@ class application_queue
$hResult = query_parameters($sQuery, $this->oApp->iAppId);
if($hResult)
{
if($oRow = mysql_fetch_object($hResult))
if($oRow = query_fetch_object($hResult))
$iVersionId = $oRow->versionId;
}
}
@@ -230,7 +230,7 @@ class application_queue
return FALSE;
/* There's no point in displaying an empty table */
if($hResult === null ||mysql_num_rows($hResult) == 0)
if($hResult === null || (query_num_rows($hResult) == 0))
{
echo "No matches.<br />\n";
return;
@@ -256,7 +256,7 @@ class application_queue
echo "<table cellpadding='5px'>";
echo html_tr($aHeader, "color4");
for($i = 0; $oRow = mysql_fetch_object($hResult); $i++)
for($i = 0; $oRow = query_fetch_object($hResult); $i++)
{
$oApp = new application($oRow->appId);
$aCells = array(