HEX
Server: Apache
System: Linux server1.royalgt4.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
User: mostafedeg (1125)
PHP: 5.6.40
Disabled: mail,passthru,parse_ini_file,show_source,eval,assert,pcntl_exec,dl,putenv,proc_open,popen
Upload Files
File: /home/mostafedeg/public_html/erp/controllers/toinnodb.php
<?php

// get the config file
include_once("../public/config.php");


//here the db files that include in the file
// GOES HERE ....................
include("../public/include_dao.php");

//Bank
require_once('../models/dao/BankDAO.class.php');
require_once('../models/dto/Bank.class.php');
require_once('../models/mysql/BankMySqlDAO.class.php');
require_once('../models/mysql/ext/BankMySqlExtDAO.class.php');


//Bank
$myBank = new Bank();
$myBankRecord = new BankMySqlDAO();
$myBankEx = new BankMySqlExtDAO();


//get the do the action
$do = $_GET['do'];

try {
    $dbname = ConnectionProperty::getDatabase();
    if ($_SESSION['dbname'] != "" && isset($_SESSION['dbname'])) {
        $dbname = $_SESSION['dbname'];
    }

    $sql = "SELECT CONCAT('ALTER TABLE `', TABLE_SCHEMA, '`.`', TABLE_NAME,'` ENGINE=InnoDB;') as bankname
FROM Information_schema.TABLES WHERE TABLE_SCHEMA = '" . $dbname . "' AND ENGINE = 'MyISAM' AND TABLE_TYPE = 'BASE TABLE'";
    $MyISAMTables = $myBankEx->queryStringSelect($sql);
    foreach ($MyISAMTables as $query) {
        $myBankEx->queryStringUpdate($query->bankname);
    }
    echo "Done";
} catch (Exception $exc) {
    echo "ERROR<br/>";
    echo $exc->getTraceAsString();
}
?>