9 Drop - AtjonTV/MySQLm GitHub Wiki
Drop
Function executeDrop():
The executeDrop method can be used to drop Databases or Tables.
The function requieres the full SQL-Query without the DROP
keyword.
This method is SQL-Injection save by default. To disable SQL-Injection-Prevention in order to use escapecharacters like
'
, you need to supply atrue
boolean value.
Structure:
- SQL-Query
Table Example:
// Example with escapecharacters denyed
$msql->executeDrop('TABLE Users');
$msql->executeDrop('TABLE Users', false);
// Example with escapecharacters allowed
$msql->executeDrop('TABLE Users', true);
SQL-Query:
DELETE TABLE Users;
Database Example:
// Example with escapecharacters denyed
$msql->executeDrop('TABLE MyApp');
$msql->executeDrop('TABLE MyApp', false);
// Example with escapecharacters allowed
$msql->executeDrop('TABLE MyApp', true);
SQL-Query:
DELETE TABLE MyApp;