Skip to content

Commit 06290b9

Browse files
author
nikiedev
committed
added optimizeTable() method
1 parent 4768cc0 commit 06290b9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/Db.class.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,19 @@ public function delete($table, $params = [])
618618
}
619619
}
620620

621+
/**
622+
* @param $table
623+
*
624+
* @return bool
625+
*/
626+
public function optimizeTable($table)
627+
{
628+
$sql_str = 'OPTIMIZE TABLE ' . $this->prefix . $table;
629+
$this->query = $this->dbh->prepare($sql_str);
630+
631+
return $this->query->execute();
632+
}
633+
621634
/**
622635
* @param $table
623636
*

0 commit comments

Comments
 (0)