Skip to content

Default configs and Transactions

Latest
Compare
Choose a tag to compare
@virgiliopontes virgiliopontes released this 30 Sep 19:03
  • Possibility to create and control transactions;
$mysql = new MySQLWizard\MySQLWizard($database_sets);
$mysql->trans_start(); //from Start Transaction
$result = $mysql->insert($array);
if (!result) {
    $mysql->trans_rollback();
}
$mysql->trans_commit();
  • Possibility to change database connection port;
  • Default parameters;
$database_sets= (object)array(
            'host'=>'127.0.0.1',    //HOST Address
            'port'=>'3306',         //HOST Port of MySQL
            'user'=>'root',         //Username from Connection on MySQL
            'password'=>'',         //Password from Connection on MySQL
            'database'=>'teste',    //Name of Database 
            'charset'=>'utf8',      //Charset from connection
            'country'=>'Brazil',    //Case your location is Brazil
            'echo_msg'=>false       //Show message of Transactions status 
);
$mysql = new MySQLWizard\MySQLWizard($database_sets);