set_mysql_db_name

 
          set_MYSQL_db_name($db = Configs::SRE__DEFAULT__DB__)  
This method is used only if you want to override the default MYSQL database name, stored in the engine's configuration file, in the generated report.
# This method is available in both the community edition and the commercial edition .

# Note

Please note that If you want to use the default MYSQL connection parameters, stored in the engine's configuration file, you don't need to call this method.

# Parameters

Parameter Description
$dbThe name of your MYSQL Database. If omitted, the default value stored in your config file will be used.

# Returns

This method returns the calling object, so it can be chained with other methods in the ‘ReportOptions’ class

# Code Example

 
           $report = new ReportOptions(SRE_PUBLIC_REPORT);
$report->select_tables(array("items"))   
       ->set_MYSQL_hostname("localhost")
       ->set_MYSQL_Connection_userName("my_user_name")
       ->set_MYSQL_Connection_password("my_password")
       ->set_MYSQL_db_name("my_db_name")
       ->select_all_fields();
$engine = new CustomEngine($report);
$report_path = $engine->create_report();