diff options
author | Christian Schneider | 2008-07-24 14:10:33 +0000 |
---|---|---|
committer | Christian Schneider | 2008-07-24 14:10:33 +0000 |
commit | 12eeff53b20be3e020591138a53049770b9b2955 (patch) | |
tree | 0b63e2be646d83dcde8e1863e40513b30574be14 /it_dbi.class | |
parent | 11fe0b47f21730e2f955ae63896bce2962af1829 (diff) | |
download | itools-12eeff53b20be3e020591138a53049770b9b2955.tar.gz itools-12eeff53b20be3e020591138a53049770b9b2955.tar.bz2 itools-12eeff53b20be3e020591138a53049770b9b2955.zip |
Properly save and restore state of select() in read()
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |