private function dbSize() { if ($this->is_added('db_stats')) { Yii::import('application.modules.admin.models.DbStats'); $sql = "SHOW TABLE STATUS"; $command = Yii::app()->db->createCommand($sql); $data = $command->query(); $size = 0; foreach ($data as $row) { $size += $row['Data_length'] + $row['Index_length']; } $size = $this->formatsize($size); $model = new DbStats('search'); $model->size = $size; $model->insert(); } }
<?php require_once "../tpl/atpl.php"; atpl::printent("../tpl/mmdiv.php"); ?> <?php require_once "../uti/Ureaddir.php"; require_once "../uti/MysqlHieroglyphics.php"; require_once "../uti/MysqlJiaguwen.php"; require_once "../uti/DbStats.php"; $againstDir = "../uti/jgw/mer/compound/p/"; $againstDir = "../../odb/tbi/img/jgif/"; $sql = "SELECT * FROM Jiaguwen ORDER BY jid"; $sql = "SELECT * FROM Jiaguwen"; $sql = "SELECT * FROM Jiaguwen WHERE jtoh LIKE '%,%' LIMIT 0,10"; if (isset($_REQUEST["sql"]) && strlen($_REQUEST["sql"]) > 0) { $sql = $_REQUEST["sql"]; } if (isset($_REQUEST["idimg"]) && strlen($_REQUEST["idimg"]) > 0) { $idimg = $_REQUEST["idimg"]; } $lster = new DbStats(); //$lster->makelist_1($idimg); $lster->jink_uniq_tbler_2s(); ?> <!-- id="clentarea"--> </div> </body> </html>
<?php require_once "../tpl/atpl.php"; atpl::printent("../tpl/mmdiv.php"); ?> <?php require_once "../uti/Ureaddir.php"; require_once "../uti/MysqlHieroglyphics.php"; require_once "../uti/MysqlJiaguwen.php"; require_once "../uti/DbStats.php"; $againstDir = "../uti/jgw/mer/compound/p/"; $againstDir = "../../odb/tbi/img/jgif/"; $sql = "SELECT * FROM Jiaguwen ORDER BY jid"; $sql = "SELECT * FROM Jiaguwen"; $sql = "SELECT * FROM Jiaguwen WHERE jtoh LIKE '%,%' LIMIT 0,10"; if (isset($_REQUEST["sql"]) && strlen($_REQUEST["sql"]) > 0) { $sql = $_REQUEST["sql"]; } if (isset($_REQUEST["idimg"]) && strlen($_REQUEST["idimg"]) > 0) { $idimg = $_REQUEST["idimg"]; } $lster = new DbStats(); //$lster->makelist_1($idimg); $lster->img2childrenlist($idimg); ?> <!-- id="clentarea"--> </div> </body> </html>