diff options
author | Urban Müller | 2007-08-07 14:45:40 +0000 |
---|---|---|
committer | Urban Müller | 2007-08-07 14:45:40 +0000 |
commit | 88bcdb8c4ccf79f9cfb0e7d433a1767638c36e84 (patch) | |
tree | 5793b613a2492ba7cd0b5cd5c5d457d0d8067683 | |
parent | 2f4f6cb0931561d47b0e7a6da202c815278c2a32 (diff) | |
download | itools-88bcdb8c4ccf79f9cfb0e7d433a1767638c36e84.tar.gz itools-88bcdb8c4ccf79f9cfb0e7d433a1767638c36e84.tar.bz2 itools-88bcdb8c4ccf79f9cfb0e7d433a1767638c36e84.zip |
connect at entry point, _where needs link
-rw-r--r-- | it_dbi.class | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/it_dbi.class b/it_dbi.class index eb81081..0f700be 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -175,8 +175,6 @@ function createclass($table) */ function _set(&$tags) { - $this->_connect(); - # Add member vars to tags, considering unquoted fields foreach (get_object_vars($this) as $field => $value) # Don't use isset($tags[$field]) (would not handle null values correctly) @@ -355,7 +353,6 @@ function clear($pp = true) */ function query($query) { - $this->_connect(); debug(get_class($this)."::query(\"$query\")", 4); $start = gettimeofday(); @@ -424,6 +421,8 @@ function read($id=null) */ function select($query = null) { + $this->_connect(); + $result = 0; $calc_found_rows = false; @@ -506,6 +505,8 @@ function iterate() */ function insert($tags = array(), $command = "INSERT") { + $this->_connect(); + /* Pre-processing, $tags is passed by reference and may be modified here */ $this->_write_pre_process($tags); @@ -548,6 +549,7 @@ function replace($tags = array()) */ function update($tags = array(), $query = null) { + $this->_connect(); $result = true; /* Pre-processing, $tags is passed by reference and may be modified here */ @@ -571,6 +573,7 @@ function update($tags = array(), $query = null) */ function delete($query = null) { + $this->_connect(); $result = 0; if (!$query && $this->_keyfield) |