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:
@@ -52,14 +52,14 @@ echo "</center>";
|
||||
$offset = (($currentPage-1) * $ItemsPerPage);
|
||||
$commentIds = query_parameters("SELECT commentId from appComments ORDER BY ".
|
||||
"appComments.time ASC LIMIT ?, ?", $offset, $ItemsPerPage);
|
||||
while ($oRow = mysql_fetch_object($commentIds))
|
||||
while ($oRow = query_fetch_object($commentIds))
|
||||
{
|
||||
$sQuery = "SELECT from_unixtime(unix_timestamp(time), \"%W %M %D %Y, %k:%i\") as time, ".
|
||||
"commentId, parentId, versionId, userid, subject, body ".
|
||||
"FROM appComments WHERE commentId = '?'";
|
||||
$hResult = query_parameters($sQuery, $oRow->commentId);
|
||||
/* call view_app_comment to display the comment */
|
||||
$oComment_row = mysql_fetch_object($hResult);
|
||||
$oComment_row = query_fetch_object($hResult);
|
||||
Comment::view_app_comment($oComment_row);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user