3 Chaning Database - AtjonTV/MySQLm GitHub Wiki
Changing the Database
Function executeUse():
The executeUse method can be used to change the currently selected database.
The method makes a SQL-Query to the database with the USE command.
This method is SQL-Injection save by default. To disable SQL-Injection-Prevention in order to use escapecharacters like
', you need to supply atrueboolean value.
Structure:
- Database
- Allow UnsafeQueryExecution
Example:
// Example with escapecharacters denyed
$msql->executeUse('database');
$msql->executeUse('database', false);
// Example with escapecharacters allowed
$msql->executeUse('database', true);
SQL-Query:
USE 'database';