summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class9
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)