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, 7 insertions, 2 deletions
diff --git a/it_dbi.class b/it_dbi.class
index e59bdc2..4c4b291 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -78,8 +78,13 @@ function it_dbi($p = array(), $query = null)
if ($p['getfieldinfo'])
$this->_p += $this->_get_field_info(); # Get $this->_fields and p[keyfield, autoincrement, randomid]
- if (is_array($query)) # Call with all arguments except first one
- call_user_func_array(array($this, "select"), array(0 => null) + func_get_args());
+ if (is_array($query))
+ {
+ # Call with all arguments except first one
+ $args = func_get_args();
+ array_shift($args);
+ call_user_func_array(array($this, "select"), $args);
+ }
elseif (isset($query))
$this->read($query);
}