8 Delete - AtjonTV/MySQLm GitHub Wiki
Delete
Function executeDelete():
The executeDelete method can be used to delete from Databases or Tables.
The function requieres the full SQL-Query without the DELETE
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
Example:
// Example with escapecharacters denyed
$msql->executeDelete('Users WHERE email="[email protected]"');
$msql->executeDelete('Users WHERE email="[email protected]"', false);
// Example with escapecharacters allowed
$msql->executeDelete('Users WHERE email="[email protected]"', true);
SQL-Query:
DELETE Users WHERE email="[email protected]";