Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //koneksi
- $con="....";//mysqli
- //coba bikin database sendiri dan isi table2 terserah kamu. anggap ada 5
- // masukkan view didalamnya anggap ada 2
- $aTable=array();
- /****
- buatlah fungsi
- extract semua table (only) dalam database..
- masukkan dalam array $aTable yg isinya hanya 5 (jgn 2)
- *****/
- //===lakukan proses repair/optimize
- foreach($aTable as $table){
- $sql="optimize table '{$table}';";
- $con->query($sql);
- echo "\nRepair:$table";
- }
- /*
- Buatlah sesingkat mungkin
- */
Advertisement
Add Comment
Please, Sign In to add comment