method tableSize documentation in bbn\Db\Languages\Mysql
Gets the size of a table
function(string $table, string $type = '')
{
$size = 0;
if (bbn\Str::checkName($table)) {
$row = $this->getRow('SHOW TABLE STATUS WHERE Name LIKE ?', $table);
if (!$row) {
throw new Exception(X::_('Table ') . $table . X::_(' Not found'));
}
if (!$type || (strtolower($type) === 'index')) {
$size += $row['Index_length'];
}
if (!$type || (strtolower($type) === 'data')) {
$size += $row['Data_length'];
}
}
return $size;
}
Gets the size of a table BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions