0 && MYSQL_MAJOR_VERSION >= 3.23 && intval(MYSQL_MINOR_VERSION) >= 3) { // Special speedup for newer MySQL Versions (in 4.0 format changed) if ($cfgSkipLockedTables == TRUE && MYSQL_MAJOR_VERSION == 3.23 && intval(MYSQL_MINOR_VERSION) >= 30) { $query = 'SHOW OPEN TABLES FROM ' . backquote($db); $result = mysql_query($query); // Blending out tables in use if ($result != FALSE && mysql_num_rows($result) > 0) { while ($tmp = mysql_fetch_array($result)) { // if in use memorize tablename if (eregi('in_use=[1-9]+', $tmp)) { $sot_cache[$tmp[0]] = TRUE; } } mysql_free_result($result); if (isset($sot_cache)) { $query = 'SHOW TABLES FROM ' . backquote($db); $result = mysql_query($query); if ($result != FALSE && mysql_num_rows($result) > 0) { while ($tmp = mysql_fetch_array($result)) { if (!isset($sot_cache[$tmp[0]])) { $sts_result = mysql_query('SHOW TABLE STATUS FROM ' . backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\''); $sts_tmp = mysql_fetch_array($sts_result); $tbl_cache[] = $sts_tmp; } else { // table in use $tbl_cache[] = array('Name' => $tmp[0]); } } mysql_free_result($result); $sot_ready = TRUE; } } } } if (!isset($sot_ready)) { $result = mysql_query('SHOW TABLE STATUS FROM ' . backquote($db)); if ($result != FALSE && mysql_num_rows($result) > 0) { while ($sts_tmp = mysql_fetch_array($result)) { $tbl_cache[] = $sts_tmp; } mysql_free_result($result); } } } // 2. Displays tables if ($num_tables == 0) { echo $strNoTablesFound . "\n"; } // show table size on mysql >= 3.23 - staybyte - 11 June 2001 else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) { ?>