summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_dbi.class5
1 files changed, 3 insertions, 2 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 746b898..e755732 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -130,11 +130,12 @@ function createclass($p)
if (!isset($dbi->_tables[$dbid]))
{
+ $dbi->_tables[$dbid] = array();
for ($res = $dbi->query('SHOW TABLES'); $row = mysql_fetch_row($res);)
- $dbi->_tables[$dbid][] = $row[0];
+ $dbi->_tables[$dbid][$row[0]] = true;
}
- if (in_array($p['table'], $dbi->_tables[$dbid])) # Do not generate classes for non-existant tables
+ if ($dbi->_tables[$dbid][$p['table']]) # Do not generate classes for non-existant tables
{
$classname = $p['classprefix'] . $p['table'];