summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class13
1 files changed, 8 insertions, 5 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 77e4615..0e20c87 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -21,6 +21,9 @@
class it_dbi
{
+ var $_found_rows; # public: number of found rows if CALC_FOUND_ROWS was set
+ var $_data; # semi-public: current result as assoc array
+
# Default configuration of dbi class
var $_defaultconfig = array
(
@@ -133,7 +136,7 @@ function createclasses($p = array())
/**
* Convert table given by name into a class
*/
-function createclass($p)
+static function createclass($p)
{
# Shortcut: String config means use this table with default values
if (!is_array($p))
@@ -274,7 +277,7 @@ function _set($tags, $allfields = false)
* @see select()
* @see iterate()
*/
-function _where($params = "", $dummy_link = null, $omit_where = false)
+function _where($params = null, $dummy_link = null, $omit_where = false)
{
if (is_array($params) && (count($params) > 0))
{
@@ -833,7 +836,7 @@ function _get_field_info()
return $result;
}
-function _state_get($dbid)
+static function _state_get($dbid)
{
if (!($result = $GLOBALS['it_dbi']->_state[$dbid]))
$result = $GLOBALS['it_dbi']->_state[$dbid] = (array)it_cache::get("dbi:$dbid");
@@ -842,7 +845,7 @@ function _state_get($dbid)
return $result;
}
-function _state_put($dbid, $state, $shared = true)
+static function _state_put($dbid, $state, $shared = true)
{
#var_dump("put", $dbid, $state);
$GLOBALS['it_dbi']->_state[$dbid] = $state;
@@ -850,7 +853,7 @@ function _state_put($dbid, $state, $shared = true)
it_cache::put("dbi:$dbid", array('link' => null) + (array)$state); # link is not transferable
}
-function _state_purgeshared($dbid = null)
+static function _state_purgeshared($dbid = null)
{
#var_dump("purgeshared", $dbid);
it_cache::put("dbi:" . ($dbid ? $dbid : $GLOBALS['it_dbi']->_dbid), array()); # Nuke shared cache