From 12eeff53b20be3e020591138a53049770b9b2955 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Thu, 24 Jul 2008 14:10:33 +0000 Subject: Properly save and restore state of select() in read() --- it_dbi.class | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'it_dbi.class') diff --git a/it_dbi.class b/it_dbi.class index 6c26a3a..80f0ce8 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -431,9 +431,11 @@ function query($query, $p = array()) */ function read($id=null) { - $mres = $this->_result; + $old_result = $this->_result; + $old_nofetch = $this->_nofetch; $result = $this->select(array($this->_p['keyfield'] => $id)); - $this->_result = $mres; + $this->_result = $old_result; + $this->_nofetch = $old_nofetch; return $result; } -- cgit v1.2.3