|
From: Benjamin C. <bc...@us...> - 2002-04-12 00:32:52
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv19345
Modified Files:
bug.php
Log Message:
Fix a bug with stickiness of limit query
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- bug.php 10 Apr 2002 15:26:35 -0000 1.97
+++ bug.php 12 Apr 2002 00:32:48 -0000 1.98
@@ -493,8 +493,12 @@
///
/// Grab the links for the previous and next bugs in the list
function prev_next_links($bugid, $pos) {
- global $db, $_sv, $QUERY, $t;
+ global $dsn, $_sv, $QUERY, $t;
+ // Create a new db connection because of the limit query affecting later queries
+ $db = DB::Connect($dsn);
+ $db->setOption('optimize', 'portability');
+
if (!isset($_sv['queryinfo']['query']) || !$_sv['queryinfo']['query']) {
return array('', '');
}
@@ -510,8 +514,8 @@
$_sv['queryinfo']['query'], $bugid, $_sv['queryinfo']['order'],
$_sv['queryinfo']['sort']), $offset, $limit);
- list($firstid, $chunks) = $rs->fetchRow(DB_FETCHMODE_ORDERED);
- list($secondid, $chunks) = $rs->fetchRow(DB_FETCHMODE_ORDERED);
+ list($firstid, $chunks) = $rs->fetchRow();
+ list($secondid, $chunks) = $rs->fetchRow();
if ($pos) {
if ($firstid) {
|