From 6e14528192f435ad8d78fc076b5732ae5e9acf98 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 20 Aug 2004 05:40:16 +0000 Subject: [PATCH] - Patch #10196 by drumm: fixed off by one error. --- database/updates.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/updates.inc b/database/updates.inc index 47344f261c2..f7922c4aebc 100644 --- a/database/updates.inc +++ b/database/updates.inc @@ -1003,7 +1003,7 @@ function update_85() { $ret[] = update_sql("UPDATE {sequences} SET name = '{aggregator_feed}_fid' WHERE name = '{feed}_fid'"); $ret[] = update_sql("ALTER TABLE {item} RENAME TO {aggregator_item}"); $ret[] = update_sql("ALTER TABLE {aggregator_item} DROP attributes"); - $max = db_result(db_query_range("SELECT iid FROM {aggregator_item} ORDER BY iid DESC", 1, 1)); + $max = db_result(db_query_range("SELECT iid FROM {aggregator_item} ORDER BY iid DESC", 0, 1)); if ($max) { $ret[] = update_sql("INSERT INTO {sequences} (name, id) VALUES ('{aggregator_item}_iid', $max)"); }