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 a true boolean value.

Structure:

  1. 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;

This image should be loaded here -> http://dl.atvg-studios.at/_github_wiki/_mysqlm/drop.png