Monthly Archive: February 2019

0

Laravel Training

<?php        require_once (‘MysqliDb.php’);        /**main db */        $db = new MysqliDb (‘127.0.0.1’, ‘root’, ”, ‘moodledb2’);        /**slave db */        $db->addConnection(‘slave’, Array (            ‘host’ => ‘127.0.0.1’,            ‘username’ => ‘root’,            ‘password’ => ”,            ‘db’=> ‘moodlelaravel’,            ‘port’ => 3306,            ‘prefix’ => ‘my_’,            ‘charset’ => ‘utf8’)        );        $menu = $db->connection(‘slave’)->get(‘admin_menu’);        $users = $db->get(‘mdl_user’);                foreach($users as $user){            $data...