summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_dbi.class8
1 files changed, 4 insertions, 4 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 9207b63..178a9d4 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -118,15 +118,15 @@ function createclass($p)
# Make sure singleton exists
$dbi = $GLOBALS['it_dbi'] ? $GLOBALS['it_dbi'] : new it_dbi(array('table' => null) + $p);
- $db = $dbi->_p['db'];
+ $dbid = "{$dbi->_p['user']}@{$dbi->_p['server']}:{$dbi->_p['db']}";
- if (!isset($dbi->_tables[$db]))
+ if (!isset($dbi->_tables[$dbid]))
{
for ($res = $dbi->query('SHOW TABLES'); $row = mysql_fetch_row($res);)
- $dbi->_tables[$db][] = $row[0];
+ $dbi->_tables[$dbid][] = $row[0];
}
- if (in_array($p['table'], $dbi->_tables[$db])) # Do not generate classes for non-existant tables
+ if (in_array($p['table'], $dbi->_tables[$dbid])) # Do not generate classes for non-existant tables
{
$classname = $p['classprefix'] . $p['table'];